Hopefully this helps get you started in the right direction:
<?php
// ---------- DATABASE SECTION -------
// ===================================
//define variables
$hostname="localhost";
$username="username-here";
$password="password-here";
$database="database-name-here";
// select date format
$entrydate=date("Y.m.d g:iA D ");
//Name of the MySQL table to write info to
$usertable="database-tablename-here";
/ Name of fields in form
01. item1
02. item2
03. item3
..
99. item99 ...yada yada yada ad infinitum
/
//Connect to server with username and password
MYSQL_CONNECT($hostname, $username, $password)
or die ("Could not connect");
//DEBUG - print ("Connected to host successfully");
//Now Connect to database
@mysql_select_db ("$database")
or die ("***Could not connect to database");
//DEBUG - print (" --Connected to database successfully");
//Primary Key, ID, set to auto increment, will not be passed from the form
//Let's Send data (pass values) to the database table
//field names on before VALUES are the names in your table
//field names on after VALUES with the $ sign are the actual names from the PHP script
$query="INSERT INTO $user-table (item1, item2, item3) VALUES ('$item1','$item2','$item3');
$result=MYSQL_QUERY($query);
//DEBUG - check syntax (remove // below)
//echo $query;
//DEBUG - send errors to the screen (remove // below)
//print mysql_error() . "<br>";
//close connection
MYSQL_CLOSE();
?>