Advertisement
Guest User

Untitled

a guest
Oct 5th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <?php
  2.  
  3. $dbname = 'myusername when the hell i go back uni';
  4. $con = @mysql_connect('connection path', $dbname, $dbname);
  5. $firstname = $_POST['firstname'];
  6. $lastname = $_POST['lastname'];
  7. $Email = $_POST['Email'];
  8. $username = $_POST['Username'];
  9. $password = $_POST['Password'];
  10.  
  11.  
  12. if (!$con)
  13. {
  14. die('Could not connect: ' . mysql_error()); # error will come when the connection is not right
  15.  
  16. }
  17.  
  18. mysql_select_db($dbname) or die("database dosent exsist");
  19.  
  20.  
  21. if (!mysql_query($query,$con))
  22.  
  23. {
  24. die('can not connect to database: ' . mysql_error());
  25. }
  26.  
  27. echo "you are now a user on the website you can login";
  28. mysql_close($con);
  29. exit;
  30.  
  31.  
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement