OK so if I understand you correctly you want to do the following:
a) user submits form
b) check the data is all ok
c) insert into the db a portion of the submitted data
d) insert a second chunk of the data into a different table including something that was inserted from step c.
Now assuming thats what you want to do, its a simple case of inserting the data in step c, then run a SELECT to grab whatever data you want to insert again in step d.
for example (i'm skipping error -checking for brevity's sake)
$sql1 = "INSERT INTO table1 (a,b) VALUES ($a,$b)";
$result1 = mysql_query($sql1);
$sql2 = "SELECT a FROM table1 ORDER BY a ASC LIMIT 1";
$result2 = mysql_query($sql2);
if ($result2){
$someValue=$myrow["a"];
}
$sql3 = "INSERT INTO table2 (a) VALUES ($somevalue)";
$result3 = mysql_query($sql3);
/*etc etc*/
Its a very brief example but I'm just trying to illustrate the flow of one way of doing it.
Hope this helps
PS Just seen tomhath's reply re mysql_insert_id() - that's another way to do it - better way actually...
/s