MySQL Forums
Forum List  »  PHP

PHP form - WHERE problem ----Please HELP----
Posted by: Kostas Tsirigos
Date: September 01, 2005 04:43PM

Hello everyone!
I have created page with a form where the user can supply data in several fields.
The question is, when PHP gets all data supplied by the user (by using $_POST variable) and a general SQL query is ready, in the WHERE clause of the query, how will I insert the values submitted by the user?
Let's say you have 3 fields in the form: name, age, color
the SQL query is : SELECT ...... FROM ...
WHERE ???

Which value will be first inserted? I am asking this, because the user may not supply info about the field 'name' and may only be interested in searching about 'age'.

Options: ReplyQuote


Subject
Written By
Posted
PHP form - WHERE problem ----Please HELP----
September 01, 2005 04:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.