I have to insert data into 2 different tables (nova_vozila and oprema), but when I submit form it only inserts data into first table (nova_vozila), what am I doing wrong????
This is the script:
<?php
if ($submit) {
$db = mysql_connect();
mysql_select_db();
$sql = "INSERT INTO nova_vozila(model,tip,letnik,karoserija,......etc)
VALUES('$model','$tip','$letnik','$karoserija',.....etc) ";
$sql2="INSERT INTO oprema (op1,op2,op3,op4,op5......op59) VALUES('$op1','$op2','$op3','$op4','$op5'......op44')";
//values from op45 - op59 don't exist yet.
$result = mysql_query($sql);
$result2 = mysql_query($sql2);
}
?>