I am searching for codes examples that show how to use PHP with MySql to send form data into more than one table.
i can send form data into one table only,
no matter how i try, no data will go into the second table.
the sequence that works for data into a single table is:
1. set variables - $var = $_POST['var'];
2. check to see if form submitted - if (isset($_POST['submit'])); {
3. open the db connection - require_once=('/path/file.php');
4. specifiy insert table (col) -insert into tablename (column)
5. specify values (value) - values ('value')
6. check query success - $result=mysql_query($query)
7. echo confirmation -if ($result) echo "good"; else echo "bad"; }
i've tried various ways to add in the second table data with no success.
i cannot find any forum threads on this, except the one I already started.
All help welcome.
thanks
amy
i can send form data into one table only,
no matter how i try, no data will go into the second table.
the sequence that works for data into a single table is:
1. set variables - $var = $_POST['var'];
2. check to see if form submitted - if (isset($_POST['submit'])); {
3. open the db connection - require_once=('/path/file.php');
4. specifiy insert table (col) -insert into tablename (column)
5. specify values (value) - values ('value')
6. check query success - $result=mysql_query($query)
7. echo confirmation -if ($result) echo "good"; else echo "bad"; }
i've tried various ways to add in the second table data with no success.
i cannot find any forum threads on this, except the one I already started.
All help welcome.
thanks
amy