Has anyone here created a dynamically generated SQL insert statement? I've done this before in ASP but never in PHP.
I've found this piece of code which works with an UPDATE statement.
while(list($key, $value) = each($HTTP_POST_VARS)){
$message[] = $key;
$message_values[] = $value;
//set one value at a time
$upd[] = " $key = '$value'";
//this will loop until sql is built
}
$update=implode(',',$upd);
echo $SQL;
Any help would be great.