How can i submit various data to various tables in a database.
Here is the coding...
<?php
// Include the config
include("dbconfig.php");
// Set the variables from the form
$realname = $_POST['frmrealname'];
$user = $_POST['frmusername'];
$title = $_POST['frmtitle'];
$body = $_POST['frmstory'];
$storysql = "INSERT INTO submission SET title='$title', user='$user', body='$body' " & "INSERT INTO user SET realname='$realname', user='$user'";
if (mysql_query($storysql)) {
echo("Your tutoral has been added<br />");
} else {
echo("Error adding entry: " . mysql_error() . "");
}
?>