I’m trying to echo out a specific value, but whenever I run the code- all I get is
nothing.
My code is here:
$studentname = mysql_query("SELECT * FROM $alias WHERE FBID=$user") or die ('Error: '.mysql_error ());
while($row = mysql_fetch_array($studentname))
{
$queried_name = $row['Name'];
echo 'Name: ' . $queried_name;
}
$nameIS your resource handler because of this…and the error you received is because you tried to echo the resource handler, inside your loop
I understand the confusion, and I would suggest that you name your variables accordingly to avoid this. I would always name my resource handler with a prefix of
$rsto make it clear that it is a resource.