Pandareen Posted December 30, 2011 Share Posted December 30, 2011 Hello!Is this correct? $sql="INSERT INTO pacienti (nume, prenume, cnp, varsta, sex, casa_asigurari, oras, strada, numar, judet, data_inregistrarii) VALUES ('$_POST[nume]','$_POST[prenume]','$_POST[CNP]','$_POST[varsta]','$_POST[sex]','$_POST[casa]','$_POST[oras]','$_POST[strada]','$_POST[nr]','$_POST[judet]','$_POST[internare]')"; $sql="INSERT INTO diagnostic (nume) VALUES ('$_POST[diagnostic]')"; and i mean..if i can do 2 insert in 2 different tables...or how can i do this? Link to comment https://forums.phpfreaks.com/topic/254070-insert-x2/ Share on other sites More sharing options...
Muddy_Funster Posted December 30, 2011 Share Posted December 30, 2011 That's the standard way of doing it. just remember to execute each query before you overwrite the $sql variable with the next one. Link to comment https://forums.phpfreaks.com/topic/254070-insert-x2/#findComment-1302484 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.