I'm trying to insert the same data into two separate tables though I'm having issues with the syntax and I'm not sure how to correctly format everything. I know the queries work when run individually though when I try to run it as below I either get syntax errors or the last query runs and that's it.
$sql = "BEGIN TRANSACTION";
"INSERT INTO users (user_name, first_name, last_name, email, password, hash) "
. "VALUES ('$user_name','$first_name','$last_name','$email','$password', '$hash')";
"INSERT INTO tbluser (user_name, first_name, last_name, email, password, hash) "
. "VALUES ('$user_name','$first_name','$last_name','$email','$password', '$hash')";
"COMMIT TRANSACTION";