Originally posted by JAPH
ok, it was an idiotic mistake on my part....but wouldn't something like $result be an invalid mysql resource with out the $dbi(conects to database) variable?
not really. In the absence of a link identifier, it will assume the last open link. Most mysql commands in php make the link resource optional. most, but NOT all. Read the manual at php.net to find out which ones require it and which ones don't.
Of course, if you happen to have 2 link resource identifiers, then you would need to specify.
As for your code snippet:
print out the # of rows being returned before mysql_fetch_row and see how many results you get.
print "Rows: " . mysql_num_rows($result) . "<br>\n";
Ideally, it should be just 1, but is uid a unique # in your table?
Where is $uid being set?
if the # of rows is 0, then it found no matches, if # of rows is > 1 then uid is not unique but it should be.