quickstopman Posted July 6, 2007 Share Posted July 6, 2007 hey guys im currently working on a page that posts a topic in my data base but for some odd reason instead of it posting the info i the database it just posts the info and the screen and doesn't put it in the database here is the code <? ob_start(); session_start(); include("ZZcode.h"); include("header.php"); include("config.php"); if(isset($_SESSION['email'])) { if($_POST['submit']) { $errors = array(); $topic = $_POST['topic']; $content = ZZcode($_POST['content']); if (empty($topic)) { echo ' <script type="javascript"> alert("Please Enter a Topic!"); </script> '; return false; } if (empty($content)) { echo ' <script type="javascript"> alert("Please Enter Content!"); </script>'; return false; } $query = "INSERT INTO post (topic, content, time_posted , reply_to, posted_by) VALUES ('$topic', '$content', '', '$topic', '{$_SESSION['username']}')"; $result = @mysql_query($query) or die(mysql_error()); echo "Thanks for posting your topic!<br> you can view your topic <a href='posts.php'>here</a><br>"; } else { echo ' <form action="'. $_SERVER['PHP_SELF'] .'" method="POST"> Topic: <input name="topic" type="text"><br><br> Post Content:<br> <textarea cols="32" rows="10px" name="content"></textarea><br> <input type="submit" name="submit" value="Post Topic"> </form> '; } } else { echo "You must be logged in to post a forum topic"; } ?> any ideas? thanks Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 6, 2007 Share Posted July 6, 2007 any error message Quote Link to comment Share on other sites More sharing options...
quickstopman Posted July 6, 2007 Author Share Posted July 6, 2007 nope 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.