Query was empty

admin

Administrator
Staff member
I tried to insert a data to my personnel dbase but it returns this error, why?

Error adding submitted form: Query was empty

here's my code:

if("submit" == $submit)
{
$insert_data = "INSERT INTO personnel SET "
"firstname = '$first_name', ".
"lastname = '$last_name'";
}

if (mysql_query($insert_data)) {
echo("<p>Data successfully updated!.</p>");
} else {
echo("<p>Error adding submitted form: " .
mysql_error() . "</p>");
}

Am I missing something here? Please help...
 
Back
Top