daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest Jun 17th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?PHP
  2.     mysql_connect("localhost","prang123","whydoyouwannaknow") or die ("Can not connect to the database");
  3.     mysql_select_db("user_db") or die ("Can not find the database");
  4.  
  5.  
  6. $myusername=$_POST["username"];
  7. $mypassword=$_POST["password"];
  8.  
  9.  
  10. $sql="SELECT * FROM users WHERE Username='".$myusername."' and Password='".$mypassword."'";
  11. $result=mysql_query($sql);
  12. //
  13.  
  14. // Mysql_num_row is counting table row
  15. $count=mysql_num_rows($result);
  16. // If result matched $myusername and $mypassword, table row must be 1 row
  17.  
  18.  
  19. if ($count= 1) {
  20. $check ==1;
  21. } else {
  22. $check ==2;
  23. };
  24.  
  25. print "&check1=$check&postuser=$myusername&postpass=$mypassword&count=$count";
  26.  
  27. ?>
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