Lets see if I understand this correctly...
Are trying to input the data directly from the form to MySQL...???
Set the form's action to the same page. Then insert the data into MySQL from the header of your page with a sql statement.
It should look something like this:
$sql = "INSERT INTO yourtable (name, email) VALUES ('$name', '$email')";
By setting up you form this way you can make sure the form isn't blank, apply filters, or modify the string before you insert it into you db.
Example:
// check form
if ((strlen($name) == 0)||
(strlen($email) == 0)) {
$err="Information Missing!";
}
Finally, you can skip over all of this the first time a visitor pulls up that page with:
if (isset($name)) {
I hope this is helpful to you.