Well, assuming that your form elements containing the data are named, those names become keys in the $POST superglobal, if form's method is POST, or in $GET superglobal if form's method is GET. Then you clear potential SQL injection threat with type-casting integers and escaping strings, and insert in your database. The most basic example:
The form:
<form action="thescript.php" method="post">
<input type="text" name="some_string_data">
<input type="text" name="some_integer_data">
</form>
thescript.php:
// Connect to db
$db= mysql_connect ('server', 'username', 'password');
mysql_select_db ('database_name', $db);
// Get data from form elements with names some_string_data and some_integer_data
$some_string= mysql_real_escape_string ($_POST['some_string_data']);
$some_integer= (int) $_POST['some_integer_data'];
// Insert into the database
$res= mysql_query ("INSERT INTO table_name (fieldname1, fieldname2) VALUES ('$some_string', $some_integer)");
Of course, your database tables should be created according to what data it should store, in this case fieldname1 should be field containing strings (CHAR, VARCHAR or TEXT), and fieldname2 should be a numeric field (for example, TINYINT, SMALLINT, INT, ...).
Hope this helps.