Advertisement
Guest User

Untitled

a guest
May 14th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. <?php
  2. $type= $_POST["Type Select Name"]; //Optional
  3. $username = mysql_real_escape_string($_POST["user"]);
  4. $password = mysql_real_escape_string($_POST["pass"]);
  5.  
  6. $conn = mysql_connect("localhost", "root", "ascent") or die(mysql_error());
  7. mysql_select_db("logon", $conn) or die(mysql_error());
  8.  
  9. mysql_query("INSERT INTO `accounts` (`login`, `password`, `type`) VALUES ('" . $username . "', '" . $password . "', '" . $type . "')") or die(mysql_error());
  10.    echo("Congratulations, you have succesfully registered the account '" . $username . "'");
  11. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement