Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <?php
- if(isset($_POST['submitted']))
- {$errors= array();
- require_once ('db.php');
- }
- $username= $_POST['username'];
- $password= $_POST['password'];
- $query= "INSERT INTO users (username, password) VALUES ('$username', '$password')";
- $result= @mysql_query($query);
- if (mysql_affected_rows() ==1)
- {
- echo '<font color="green"> Thank You! </font>
- <font color="green">You have now been registered. Your account is now active and you are ready to log in.</font>';
- }
- else
- {
- echo '<font color="red"> You could not be registered, please contact us about the problem and we will fix it as soon as we can.</font>';
- }
- ?>
- <head>
- <title>Registration</title>
- </head>
- <body>
- <form id='register' action='register.php'
- method='post'
- accept-charset='UTF-8'>
- <legend>
- <input type='hidden' name-'submitted'
- id='submitted' value='1'/>
- <label for='username'><br>
- Username:</label>
- <input type='text' name='username'
- id='username' maxlength="10" />
- <br>
- <label for='password'> Password:</label>
- <input type='password' name='password'
- id='password' maxlength="30" />
- <br>
- <input type='submit' name='submit'
- value='submit' />
- </legent>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement