| But here's what I want to do now: I want to use the same two
| lines of code for any possible form data that might be submitted
mysql_list_fields retrieves all field names of $table;
with that you can build your SET-clause for the query.
something like:
$fields = mysql_list_fields($db, $tbl);
$columns = mysql_num_fields($fields);
for ($i = 0; $i < $columns; $i++) {
$fld = mysql_field_name($fields, $i);
$set .= "$fld='$".$fld."', ";
}
btw: mysql_query("UPDATE ..."); works and saves a line of code.
Vincent
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]