Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( isset($_POST['Register']) )
- {
- // get data
- $username = $_POST['username'];
- $password = $_POST['password'];
- $retypepassword = $_POST['retypepassword'];
- $email = $_POST['email'];
- if ($username && $password && $retypepassword && $email)
- {
- if ($password == $retypepassword)
- {
- include ("connect.php");
- $query = mysql_query ("SELECT username WHERE username='$username'");
- $numrows = mysql_num_rows($query);
- echo "Je bent succesvol geregistreerd!";
- }
- else
- {
- echo "Wachtwoorden komen niet overeen";
- }
- }
- else
- {
- echo "Je hebt niet alle velden ingevuld";
- }
- }
- else
- {
- echo "<html>
- <body>
- <form action='register.php' method='POST'>
- <table width='300'>
- <tr>
- <td align='right'>Spelersnaam:</td>
- <td align='left'><input type='text' name='username'></td>
- </tr>
- <tr>
- <td align='right'>Wachtwoord:</td>
- <td align='left'><input type='password' name='password'></td>
- </tr>
- <tr>
- <td align='right'>Wachtwoord nogmaals:</td>
- <td align='left'><input type='password' name='retypepassword'></td>
- </tr>
- <tr>
- <td align='right'>Email:</td>
- <td align='left'><input type='text' name='email'></td>
- </tr>
- <tr>
- <td align='right'></td>
- <td align='left'><input type='Submit' name='Register'></td>
- </tr>
- </table>
- </form>
- </body>
- </html>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement