kleb Posted January 2, 2012 Author Share Posted January 2, 2012 am very greateful for all your responses but its stil not working yet.i can only comment once on a topic,any further comments wil not be displayed and this is thesame with all the topics Quote Link to comment https://forums.phpfreaks.com/topic/254068-problem-with-select/page/2/#findComment-1303360 Share on other sites More sharing options...
jcbones Posted January 2, 2012 Share Posted January 2, 2012 So, give us something to work with. Form Insert script We need to see updated scripts with everything you try. I pointed out a problem with your insert script, I assume that was taken care of. Quote Link to comment https://forums.phpfreaks.com/topic/254068-problem-with-select/page/2/#findComment-1303364 Share on other sites More sharing options...
kleb Posted January 2, 2012 Author Share Posted January 2, 2012 its still not working as expected.only one comment is selected where as there are more than one comment on a topic Quote Link to comment https://forums.phpfreaks.com/topic/254068-problem-with-select/page/2/#findComment-1303366 Share on other sites More sharing options...
PaulRyan Posted January 2, 2012 Share Posted January 2, 2012 I've re-done you're reply.php file. You will need to add a new input to your form that posts the reply message something like this: <input type="hidden" name="topicsID" value="<?PHP echo intVal($_GET['id']);?>"> Then change your reply.php file to the following, which will add the "topicsID" to the database so you know which topic the comment was posted for. <?PHP include"header.php"; if($_SERVER['REQUEST_METHOD'] == 'POST') { $topicsID = intVal($_POST['topicsID']); $comment = mysql_real_escape_string(trim($_POST['comment'])); $name = mysql_real_escape_string(trim($_POST['name'])); if($comment!=='' && $name!=='' && $topicID != 0) { $ins="INSERT INTO `post` (`topicsID`,`post_content`,`post_by`)VALUES({$topicsID}, '{$comment}','{$name}')"; mysql_query($ins) or die(mysql_error()); if(mysql_affected_rows()) { echo"succesfull, you can click back to view your comment and other new comments"; } else { echo"You can not post an empty page or leave your name blank"; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/254068-problem-with-select/page/2/#findComment-1303373 Share on other sites More sharing options...
kleb Posted January 2, 2012 Author Share Posted January 2, 2012 pls its stil not working as the SELECT page just and display them instead of comments made on a certain topic :'( Quote Link to comment https://forums.phpfreaks.com/topic/254068-problem-with-select/page/2/#findComment-1303424 Share on other sites More sharing options...
jcbones Posted January 2, 2012 Share Posted January 2, 2012 Post EVERYTHING you have related to this topic. It will get sorted quickly. As of now, we can only guess at what you have currently. Quote Link to comment https://forums.phpfreaks.com/topic/254068-problem-with-select/page/2/#findComment-1303466 Share on other sites More sharing options...
kleb Posted January 3, 2012 Author Share Posted January 3, 2012 this is the whole code.pls note i embeded comment.php and page.php withing html 17244_.php 17245_.php 17246_.php 17247_.php Quote Link to comment https://forums.phpfreaks.com/topic/254068-problem-with-select/page/2/#findComment-1303610 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.