hi all,
i am looking on how to insert values into multiple database. like one table is of name and other is of roll number. how do i send name to name table and roll number into rnumber table?
Easiest is to simply run 2 queries
mysql_query(“INSERT INTO table_1 (field_1) VALUES (value_1)”) or die(mysql_error());
mysql_query(“INSERT INTO table_2 (field_2) VALUES (value_2)”) or die(mysql_error());
I get it, so i should put these query into one function that is called on submit button.?
Use this code:
$query1=mysql_query(“INSERT INTO name_table (column name) VALUES (value1)”);
$query2=mysql_query(“INSERT INTO roll.no_table (column name) VALUES (value1)”);