SHARE
TWEET

Untitled

a guest May 31st, 2017 200 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $con = mysql_connect("$localhost","$username","$password","$database");
  3. $localhost = '127.0.0.1'; // host
  4. $username = 'root'; //User
  5. $password = 'password'; //password
  6. $database = 'World'; //Database
  7.  
  8. if (!$con)
  9.   {
  10.   die('Could not connect: ' . mysql_error());
  11.   }
  12.  
  13. mysql_select_db("my_db", $con);
  14.  
  15. $sql="INSERT INTO accounts (login, password, gm, banned, email,)
  16. VALUES
  17. ('$_POST[login]','$_POST[pasword]','0','0','$_POST[email]')";
  18.  
  19. if (!mysql_query($sql,$con))
  20.   {
  21.   die('Error: ' . mysql_error());
  22.   }
  23. echo "1 record added";
  24.  
  25. mysql_close($con)
  26. ?>
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