I have error message that i dont understand and dont know where to look for the error?
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where user_password='rami2009'' at line 1
I have found the problem. i had two where statements in the same row!
my problem now is that i dont get any error and i dont get anything printed on the screen and i dont know why! here is the code:
$host="xxx.com";
$db_name="xxx";
$username="xxx";
$password="xxx";
$theid=$_POST['loginid'];
$thepass=$_POST['password'];
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$results= mysql_query("SELECT user_id, user_password FROM tbl_auth_user WHERE user_id='$theid' and user_password='$thepass'") or die(mysql_error());
$row = mysql_fetch_array($results);
$var1 = $row['user_id'];
$var2 = $row['user_password'];
echo $var1;
echo $var2;