Sorry i forgot to mention the database server i was using... i am using mySQL.. i have though about using a db transaction to do something like.
$fname = "john";
$lname = "simpson";
insert into users ('fname', 'lname') values ('$fname', '$lname');
select id from users where fname = "john" and lname = "simpson";
and then use that id as a key to complete the inserts to the other tables?
Does this sound like a good idea or is there a better way?