Home › Forums › Back End › Adding data from an insert form into two tables › Re: Adding data from an insert form into two tables
July 11, 2010 at 9:24 am
#79599
xgrewellx
Member
You could always create a "unique identifier" for each entry on your own. I don’t know what exactly you are storing into the db, but I’ll give a generic example.
Code:
//generate unique serial off of the current date, easy enough
$unique = date(U);
$name = $_POST[‘name’];
$email = $_POST[’email’];
//and so on,
$unique = date(U);
$name = $_POST[‘name’];
$email = $_POST[’email’];
//and so on,
//run your two queries, you can link them by puting that $unique var into both tables, then when you query for them you can use “WHERE unique = ‘$unique'” or something of the sort.
if that makes any sense at all.