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

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #29590

    I’m working in Dreamweaver and I need to create an insert form that will add the data from the form into two tables in the database. I’ve found tons of instructions for creating a form to insert data into one table, but I can not find a tutorial that will take me through the steps of how to insert data into two tables in one transaction with one insert form. Does anyone have a great tutorial out there on this?


    You cannot do it, you will need to run 2 query’s


    Thanks for the heads up. Does anyone have any good tutorials on this? I need a tut that will take me through the steps. Thanks in advance for your help on this.


    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.

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.