Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2.  
  3. // Make a MySQL Connection
  4. mysql_connect("localhost", "root", "")
  5. or die(mysql_error());
  6.  
  7. // Select Database
  8. mysql_select_db("dbusers")
  9. or die(mysql_error());
  10.  
  11. // Insert values into table
  12. mysql_query("INSERT INTO users VALUES ( '$username', '$password', '$email' )");
  13.  
  14.   $username = $_post('username')
  15.   $password = $_post('password')
  16.   $email = $_post('email')  
  17.  
  18.  
  19. //The web form for input ability
  20.  
  21.   {
  22.   echo "<form action=\"register.php\" method=\"post\">\n";
  23.   echo "Username: <input name=\"username\" MAXLENGTH=\"16\"><br />\n";
  24.   echo "Password: <input type=\"password\" name=\"password\" MAXLENGTH=\"16\"><br />\n";
  25.   echo "Email Address: <input name=\"email\" MAXLENGTH=\"25\"><br />\n";
  26.   echo "<input type=\"submit\">\n";
  27.   echo "</form>\n";
  28.   }
  29.         // EOF
  30.         ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement