Hi,
 
I've got a html form where not all fields need to be filled by the users. How can I build a MySQL query based on which fields the user have filled?
 
My guess is that I can do something like this:
 
if(!empty($f_name)) {
some_commands_to_add_$f_name_to_querystring
}
if(!empty($l_name)) {
some_commands_to_add_$f_name_to_querystring
}
some_commands_to_build_querystring_based_on_if's
 
$result = mysql_query($query)
 
 
But what commands/functions should I use to build the query?

--
anders thoresson

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to