April 12th, 2000, 04:23 PM
I have a form that allows a user to enter their name, it passes this forward as $name.
When I do this: $result = mysql_query("SELECT * FROM people WHERE name=$name",$db);
I get this: Warning: Supplied argument is not a valid MySQL result resource
If I change my select statement and hardcode in the name EG: 'amber' then it works ?!?!!
Please help I have messed around for days with this one !
April 13th, 2000, 04:28 AM
you need to put ' ' around your variable ie:
("SELECT * FROM people WHERE name='$name'",$db);