Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Adding data from an insert form into two tables Re: Adding data from an insert form into two tables

#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,

//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.