I have this query which I would like to insert data into two tables.
It inserts into the first but not the second, any ideas why?
$result1 = mysql_query("INSERT INTO entries (UserID, FirstName, LastName, EmailAddress, TelephoneNumber, Image, Status) VALUES ('NULL', '$FirstName', '$LastName', '$EmailAddress', '$TelephoneNumber', '$ran2$ext', '0')") ;
$newid = mysql_insert_id($result1);
$result2 = mysql_query("INSERT INTO voting (id, EntryID, item, vote, nvotes) VALUES ('NULL', $newid, 'vt_img353', '0', '0')") ;