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 Link to comment https://forums.phpfreaks.com/topic/58640-solved-strange-post-problem/ Share on other sites More sharing options...
teng84 Posted July 6, 2007 Share Posted July 6, 2007 any error message Link to comment https://forums.phpfreaks.com/topic/58640-solved-strange-post-problem/#findComment-290929 Share on other sites More sharing options...
quickstopman Posted July 6, 2007 Author Share Posted July 6, 2007 nope Link to comment https://forums.phpfreaks.com/topic/58640-solved-strange-post-problem/#findComment-290933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.