You can submit your form in two ways: to itself or another page
// submit the form to the same page
<form action="<? echo $_SERVER['PHP_SELF']; ?>" method="post">
// or submit the form to a different page
<form action="formHandler.php" method="post">
Either way you will handle the past vars that same way, assuming you are using post. Your query...
$passVar1 = $_POST['var1'];
$passVar2 = $_POST['var2'];
// as many vars as needed
INSERT INTO table ( field1, field2, ... ) VALUES ( $passVar1, $passVar2, ... );
I hope that helps,
phpmoron