Advertisement
Bliben

Untitled

Jan 22nd, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <title>Login Details</title>
  5. <link type="text/css" rel="stylesheet" href="css.css">
  6. </head>
  7. <body bgcolor="black">
  8. <div class = box>
  9. <center>
  10. <section class="container">
  11. <h1>Admin Registration</h1>
  12.  
  13.  
  14.  
  15. <?php
  16. require('config.php');
  17.  
  18.  
  19. if (isset($_POST['submit'])){
  20. extract($_REQUEST);
  21. $user = $_POST['user'];
  22. $username = $_POST['username'];
  23. $password = $_POST['password'];
  24. $password = md5($password);
  25.  
  26. //pass variables and add them to database
  27.  
  28.  
  29.  
  30.  
  31.  
  32. mysql_query("INSERT INTO login ('id', 'user', 'username', 'password') VALUES(NULL, '$user', '$username', '$password')");
  33. echo "Registration Successful";
  34.  
  35. }
  36. else{
  37.  
  38.  
  39.  
  40. //allows for html in php which is needed for the form
  41. echo $form='
  42. <form action = "registration_form.php" method="POST">
  43. User Type: <input type = "text" name= "user" /><br />
  44. Username: <input type = "text" name= "username" /><br />
  45. Password: <input type = "text" name= "password" /><br /><br />
  46. <input type="submit" value="Register" name="submit" />
  47. </form>';
  48.  
  49. }
  50.  
  51.  
  52.  
  53. ?>
  54.  
  55.  
  56. </center>
  57. </div>
  58. </body>
  59. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement