A very simple script
Contents of file start.html:
Contents of file finish.php:
mysql_connect("xxx.domain.com", "user_name", "user_password");
$db = mysql_select_db("database");
$sql = "INSERT INTO table VALUES('" . $_POST['first_name'] . "')";
$result = mysql_query($sql);
echo "Thank you " . $_POST['first_name'] . ", your name has been added to the database";
echo "Your name have not been added!";
Using a little common sense you should be able to understand that. But I recommend looking for more examples.
You can try www.w3schools.com too for lots of tutorials on different languages.