Re: Strange issue connecting to MySQL from PHP
Bob ::
Thanks for the quick reply! At the bottom of that page, I have 3 lines commented out that I was using for troubleshooting, please see below.
$query = "SELECT username, password FROM faqusers WHERE username='$_SERVER[PHP_AUTH_USER]' and password='$_SERVER[PHP_AUTH_PW]' ";
$query2 = "SELECT user_id FROM faqusers WHERE username='{$_SERVER['PHP_AUTH_USER']}' AND password='{$_SERVER['PHP_AUTH_PW']}' ";
$result = mysql_query ($query);
$row = @mysql_fetch_array ($result);
if ($row) {
$authorized = TRUE;
}
// if ($authorized) {
// echo '<p>Result = ' . $row[0] . ' ' . $row[1] . '</p>';
// }
}
?>
Wouldn't the last "echo" ultimately be the results of "$query". After hitting the CANCEL button, this data does appear, which makes sense, since I do get authenticated.
On a side note, when I run the exact same query from within MySQL Monitor, it works without errors..... very strange.
Thanks,
Edited 2 time(s). Last edit at 05/04/2006 06:19PM by Brian Long.
Subject
Written By
Posted
Re: Strange issue connecting to MySQL from PHP
May 04, 2006 06:18PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.