Ryuujin Posted August 9, 2007 Share Posted August 9, 2007 Ok, I can't figure how to do this, what am I doing wrong? I have this code: if ($page == "Forum" && $section > "0" && $action == "postnewtopic") { $poster = $_SESSION[username]; $name = mysql_real_escape_string($_POST[title]); $message = mysql_real_escape_string($_POST[message]); mysql_query("INSERT INTO forumtopics (catparent, name) VALUES ('$section', '$name')"); mysql_query("INSERT INTO forumposts (poster, postedon, message, lastpost) VALUES ('$poster', NOW(), '$message', NOW())"); echo "Topic Posted, <a href=index.php?page=Forum§ion=$section>Continue</a>"; } It is posting into the 'forumtopics' table but not the posts table... Any help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
teng84 Posted August 9, 2007 Share Posted August 9, 2007 put a die mysql_query("INSERT INTO forumposts (poster, postedon, message, lastpost) VALUES ('$poster', NOW(), '$message', NOW())") or die (mysql_error()); to see whats the bug Quote Link to comment Share on other sites More sharing options...
Ryuujin Posted August 9, 2007 Author Share Posted August 9, 2007 I got no error. Not sure whats going on. Quote Link to comment Share on other sites More sharing options...
fenway Posted August 15, 2007 Share Posted August 15, 2007 Not sure, run check tables. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.