Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- mysql_connect("localhost","admin","***********") or die ("Can not connect to the database");
- mysql_select_db("user_db") or die ("Can not find the database");
- $myusername=$_POST["user"];
- $mypassword=$_POST["pass"];
- $sql="SELECT * FROM users WHERE User='".$myusername."' and Pass='".$mypassword."'";
- $result=mysql_query($sql);
- mail("Email-optional","hai",$sql);
- // Mysql_num_row is counting table row
- $count=mysql_num_rows($result);
- // If result matched $myusername and $mypassword, table row must be 1 row
- if($count==1){
- $check = 1;
- }else{
- $check=2;
- }
- print "&check1=$check&postuser=$myusername&postpass=$mypassword&count=$count"
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement