Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- comment table and tutorial table -->how to publish the two?


sanji41 - 1:39 am on Jul 31, 2010 (gmt 0)


the last post, last query:
$myquery = sprintf("INSERT into tutorials(title, content, author, Sentdate) VALUES ('%s', '%s', '%s', '%s')",
mysql_real_escape_string($title),
mysql_real_escape_string($content),
mysql_real_escape_string($author),
mysql_real_escape_string($Sentdate));
mysql_query($myquery) or die(mysql_error());
echo "Success!";

if(isset($_POST['save'])){
if(isset($_POST[id]));
$id1 = $_POST['id'];echo $id1;
$title1=mysql_insert_id();
$myquery ="INSERT into comment (tutorialsid_fk) values (\"$id1\")";
$result = mysql_query($myquery);
$result = mysql_query($sql);
echo "<br>Update Complete";
}


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4178971.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com