// connect to MySQL
$db = mysql_pconnect('host', 'usr', 'pwd');
// select database
mysql_select_db('db_name');
// query to insert data
$sql = "INSERT INTO tbl_name (col_name) VALUES ('$form_field_name')";
// execute query
$res = mysql_query($sql, $db);
If you do not have globals turned on you will need to access your form variable through the $_POST[] array (or $HTTP_POST_VARS[] if PHP version < 4.1.0) -
$_POST['form_field_name']
You should also do some validation before inserting user data into a db, "addslashes()", check data type, etc.
Hope this helps 😉
P.S. Download the PHP manual - all the answers are there