Hmm - check Larry Ullmans work - visual quickstart guide or www.dmcinsights.com.
The way I would do this is make a note of all the form name attributes. What you need to do then is create your db table relating to the form survey information. It should work something like this.
<?php
// if submit is clicked {
validate form inputs
and generate error messages if necessary
this bit is very important for security reasons
if ($data1 && $data2 && data3) { // if data is as we want it
include ('dbconn_script.php') // this connects us to mysql
$qry = "INSERT INTO table (field1, field2, field3) VALUES ('$data1', '$data2', '$data3')"; // build the query
$result=@($qry); // execute the query
if ($result) { // if the query ran OK
// do something that indicates success such as thanks page, email etc.
} elseif (!$result) { // if the query failed
// echo an error message or redirect to failure page.
}
mysql_free_result ($result); // frees up memory
mysql_close(); // closed db connection.
}
This is a basic overview of how the code should look which you can adapt for mose data addition situations; get the data, validate it, add it to the db if OK.
You also need to make the form action post to itself using this for the action attribute
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
I hope this helps.