I'm trying to pull from a mysql data using the following:
mysql_select_db("dbsnugtuck");
$result = mysql_query("select * from temp where sessionid = $sessionid");
while($query_data = mysql_fetch_row($result))
But when I browse the page I get:
Warning: Supplied argument is not a valid MySQL result resource in /virtualhosts/snugtuckpillow.com/www/pages/addcart.php on line 125
Line 125 is the line that starts $result =...
I know a field called sessionid exists, and $sessionid is a variable on page. What am I doing wrong? I'm new to php and mysql, so any help is greatly appreciated.
Thanks,
Leland Myrick