Forums

This topic is locked

How to pass form variable to mysql query

Posted 21 Jan 2006 19:46:08
1
has voted
21 Jan 2006 19:46:08 Jason K posted:
I am trying to pass a form menu variable to a mysql query to limit the results of a query based on the user's choice. I am having problems because the variable includes a range of numbers. I am using the GET action but because the variable includes a range, I can't pass it into a WHERE='passed_variable' limit.

The menu limits displayed results based on the price range the user selects from the drop-down menu. I am currently using the BETWEEN operator so my list values are like this "BETWEEN 10 AND 20". How can I pass a range of numbers stored in a variable into the mysql query? Is there another way to do this? Any help is appreciated. I'm using Php.

Reply to this topic