This script won't work. It worked yesterday.
I'm annoyed
($user is called from an external script)
$query = "SELECT user FROM weblog WHERE id='$id'";
$doquery = mysql_query($query)
or die(mysql_error());
$result = mysql_fetch_array($doquery);
$author = $result['user'];
if($author == $user){
$query = "SELECT * FROM weblog WHERE id='$id'";
$doquery = mysql_query($query)
or die(mysql_error());
$result = mysql_fetch_array($doquery);
$title = $result['title'];
$body = $result['contents'];
}
else{
die(include("noaccess.php"));
}
this script fails, and when I output variables, I get this:
---VARIABLE TESTING---
Nick - author
Nick - user7 - id
false - filter
1 - access
1 - login
SELECT user FROM weblog WHERE id='7' - query
---END VARIABLE TESTING---
Tell me, does or does not $author == $user, and why is it telling me they are not equal when they clearly are?
I think my server recently upgraded to 4.3.0; are there any known bugs with this version?