Just make sure that your form variables have values when you insert data to the database.
Make sure you have something like this when you insert data:
$sql=mysql_query("INSERT INTO table_name (data1,data2,data3,....) VALUES ('$data1','$data2','$data3',.......) WHERE condition...");
I think we need to see your code anyway..
Hope it helps! 😉