Am i losing my mind? The following mysql query seems to fail even though i am running it outside of the PHP code and its working fine. An echo statement shows that the select variables are being populated as expected. can anyone advise?
[PHP]
$userid = $_POST['userid'];
$password = $_POST['password'];
$getuser = "SELECT UserID,Password FROM User WHERE UserID = '$userid' AND Password = '$password'";
$userlogin=mysq l_query($getuse r);
while ($row = mysql_fetch_arr ay($userlogin)) {
$loginid = $row['UserId'];
$loginpwd = $row['Password']; }
if (!$userlogin) {
exit('<p>There was a problem recalling your user details<p>');
}
[/PHP]
[PHP]
$userid = $_POST['userid'];
$password = $_POST['password'];
$getuser = "SELECT UserID,Password FROM User WHERE UserID = '$userid' AND Password = '$password'";
$userlogin=mysq l_query($getuse r);
while ($row = mysql_fetch_arr ay($userlogin)) {
$loginid = $row['UserId'];
$loginpwd = $row['Password']; }
if (!$userlogin) {
exit('<p>There was a problem recalling your user details<p>');
}
[/PHP]
Comment