Using MySQL from PHP
Subject:   Getting PHP script to contruct MYSQL query
Date:   2008-02-25 13:10:03
From:   Fletch187
Hi There, I am a newbie to PHP and struggling to figure out how I can develop my script to construct the query based on available form data.

Form entered by user has 6 possible outputs
Name, Lname, Town , Postcode , Telephone......
User only fills in Name & Postcode
How can I construct a script to create $query = Name & Postcode, having checked all variables for the existants of strings from the form post.

The reason I want to do this is to give the user options on what they want to search with....

Thanks for any advoce / examples you can give me...