Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- mysql_connect("localhost","prang123","whydoyouwannaknow") or die ("Can not connect to the database");
- mysql_select_db("user_db") or die ("Can not find the database");
- $myusername=$_POST["username"];
- $mypassword=$_POST["password"];
- $sql="SELECT * FROM users WHERE Username='".$myusername."' and Password='".$mypassword."'";
- $result=mysql_query($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