Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$HTTP_POST_VARS[ ] problem 1

Status
Not open for further replies.

Roberti

Technical User
Joined
Mar 2, 2001
Messages
96
Location
NL
I have a form where you enter the titel of a movie which I post to another page wich has this sql query:

$SQL = "SELECT artikel_id, titel, acteur, beschrijving, prijs FROM tbl_dvd WHERE titel = $HTTP_POST_VARS[zoeken]";

But It works only if you fill in a number in the form, when you enter text it gives the following error:

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in.

Does anybody know how to fix this?
 
Hi,

Try this:

$titel = $HTTP_POST_VARS["zoeken"];

$SQL = "SELECT artikel_id, titel, acteur, beschrijving, prijs FROM tbl_dvd WHERE titel = '$titel'";

Hope this helps!

Nate

mainframe.gif

 
Thanx SPYDERIX it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top