Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- mysql_connect("Db_Host","Db_user","Db_pass") or die ("Error when it could not connect");
- mysql_select_db("DB_name") or die ("Error when it could not find the database");
- $myusername=$_POST["user"];
- $mypassword=$_POST["pass"];
- $sql="SELECT * FROM users WHERE Username='".$myusername."' and Password='".$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