SHARE
TWEET

Untitled

a guest May 31st, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $usern = $_POST['username'];
  3. $passw = $_POST['password'];
  4. include 'config.php';
  5.  
  6. if(isset($_POST["username"]) && isset($_POST["password"])) {
  7.     mysql_connect($host,$username,$password);
  8.     @mysql_select_db($database) or die( "Unable To Connect To Database $database");;
  9.     $cusername = mysql_real_escape_string($usern);
  10.     $cpassword = mysql_real_escape_string($passw);
  11.     $hashedpw = $cpassword;
  12.     mysql_query("INSERT INTO characters(username, password) VALUES('$cusername', '$hashedpw') ") or die(mysql_error());
  13.     mysql_close();
  14.     echo "<script>alert('Account Has Been Created Sucessfully!')</script>";
  15.     }
  16.     else
  17.     {
  18.         echo $html."<center><br>Error!<br></center>".$footer;
  19.     }
  20.  
  21. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top