I'm trying to insert information into multiple tables within a database, i have managed to get it to work using this:
$query = "INSERT INTO users (grp, email, college_id, tutor, year, password, register_date) VALUES ('$g', '$e', '$ci', '$tu', '$y', PASSWORD('$p'), NOW() )";
$query2 = "INSERT INTO unit_26 (college_id) VALUES ('$ci')";
$result = mysql_query ($query); // Run the Query Now woooo.
$result2 = mysql_query ($query2); // Run the Query Now woooo.
if ($result) { // If it Ran OK.
Although it works and the information is added to both tables, I was just wondering if anyone has a better way of doing this, or of this way is wrong?