Advertisement
Guest User

Untitled

a guest
May 31st, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2. $usern = $_POST['username'];
  3. $passw = $_POST['password'];
  4. include 'config.php';
  5.  
  6. if(isset($_POST["username"]) && isset($_POST["password"]) && isset($_POST["hwid"])) {
  7.     if ( $_POST["cid"] == md5($_POST["hwid"])) {
  8.         mysql_connect($host,$username,$password);
  9.     @mysql_select_db($database) or die( "Unable To Connect To Database $database");;
  10.     $cusername = mysql_real_escape_string($usern);
  11.     $cpassword = mysql_real_escape_string($passw);
  12.     $hashedpw = $cpassword;
  13.     mysql_query("INSERT INTO characters(username, password) VALUES('$cusername', '$hashedpw') ") or die(mysql_error());
  14.     mysql_close();
  15.     echo "<script>alert('Account Has Been Created Sucessfully!')</script>";
  16.     }
  17.     else
  18.     {
  19.         echo $html."<center><br>Error!<br></center>".$footer;
  20.     }
  21. }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement