<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rod k:
insert_id doesn't work without placing a null in to it's place in the query (it's not like a timestamp), so you may need to specify that in the first query.
mysql_query ("insert into member (memid,fname,lname) values (null,'$fname','$lname')");
Then it should work. To start at a higher number for initial value, you'll need to force the number for the first record. What I've done is use a dummy record with a defined number. Later, after you have "real" records you can delete the dummy.
[/quote]
Thanks. I tried that and I'm still having problems. The first table gets the data, but the second table doesn't. HEre is my code.
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
mysql_query ("INSERT INTO memtest (ffr, fname, lname)
VALUES (null, '$fname', '$lname')");
mysql_query ("INSERT INTO cartest (year, model)
VALUES (mysql_insert_id(), '$year', '$model')");
[/code]
I am still doing something wrong?