Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo"<h1>Register</h1>";
- $submit = $_POST['reg'];
- $username = $_POST['username'];
- $password = $_POST['password'];
- $confpass = $_POST['confpassword'];
- $email = $_POST['email'];
- if(!empty($_POST))
- {
- // the form has been filled
- if ($password==$confpass)
- {
- // The dirty Connect stuff
- $connect = mysql_connect ("localhost","root","");
- mysql_select_db ("betasite");
- $queryregister = mysql_query ("INSERT INTO TABLE users VALUES ('','$username','$password','$email','0')");
- die("You are Registered");
- }
- else
- {
- echo "Passwords Don't match";
- }
- }
- else
- {
- echo"Enter something into <b>all</b> boxes";
- }
- ?>
- <html>
- <form action='register.php' method='POST'>
- <table>
- <tr>
- <td>
- Pick a Username
- </td>
- <td>
- <input type='text' name='username' value='<?php echo $username ?>'/><br>
- </td>
- </tr>
- <tr>
- <td>
- Pick a Password
- </td>
- <td>
- <input type='password' name='password'/><br>
- </td>
- </tr>
- <tr>
- <td>
- Repeat the Password
- </td>
- <td>
- <input type='password' name='confpassword'/><br>
- </td>
- </tr>
- <tr>
- <td>
- Your Email
- </td>
- <td>
- <input type='text' name='email' value='<?php echo $email ?>'/><br>
- </td>
- </tr>
- </table>
- <input type="submit" name="reg" value="Register"/>
- </form>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement