Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 Same result again, but the forumid variable is "$forumid = $_GET['id'];" So it isn't in the test code. Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 Your original code: Â include "config.php"; //$forumid = $_GET['id']; $forumid = "HARD CODE THIS"; print "<link rel='stylesheet' href='style.css' type='text/css'>"; print "<A href='post.php?id=$forumid'>New Topic</a><br>"; print " <table class='maintable'> <tr class='headline'><td width=50%>Topic</td> <td width=20%>Author/td><td>Replies</td> <td>Last reply</td> </tr> "; $info="SELECT * from post_reply where parentid='0' AND forumid='$forumid' ORDER BY lastrepliedto DESC"; $info2=mysql_query($info) or die(mysql_error()); while($info3=mysql_fetch_array($info2)) { Â $info3[title]=strip_tags($info3[title]); Â $info3[author]=strip_tags($info3[author]); Â print " Â <tr class='mainrow'><td><A href='message.php?id=$info3[postid]'>$info3[title]</a></td> Â <td>$info3[author]</td> Â <td>$info3[numreplies]</td> Â <td>$info3[showtime]<br>Last post by <b>$info3[lastposter]</b> Â </td> Â </tr> Â "; } print "</table>"; Â Â If you are using "forumid" to identify then make it an "int" and "auto increment" and make it "key" Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 $forumid = "HARD CODE THIS"; ? Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 What are expecting forumid to be (value)? Â $forumid="WHAT"; Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 Whatever the id for the forum is. So i can't add in anything as i won't know what forum is being viewed, which is why i was using the $_GET to get the id from the url. Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 what is the url value? Â somethin.com?id=WHAT Â Â Â Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 A number. board.php?id=WHAT Number id of the board they are inside. Which is "forum_id" from a database called forum which gold the forum_id, description and name. Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 When you navigate to the forum you want to display, does something like this show up in your browser  yourforum.com?forum_id=123456  Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 I have it linked like so "<A href='board.php?id=$name[forum_id]'>$name[forum_name]" Â "$name[forum_id]" Ads the id number of the forum "$name[forum_name]" Name of the forum to be shown on the main page. Â Which then makes "board.php?id=" whatever number board is being viewed. So if you clicked on a board that was made 2nd the id would be "board.php?id=2" Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 What forum_id contains: Â This better work now. Ok almost got this working. Still not working Getting on my nerves Should work now this better work now Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 posts, contains that not forum_id Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 $forumid=$_GET['forum_id']; Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 Just replace all existing GET's to that? Â EDIT: Using that, the posts are again displayed on every board instead of just the one it was posted on. Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 Make Copies and comment out... Â //$forumid=$_GET['id']; $forumid=$_GET['forum_id']; Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 Still displays posts in all boards instead of just the one it was posted in. Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 Can I have the url? Â Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 It is on my computer, not online. Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 Could I have the local address? Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 Sorry i cannot provide that online. Â So is there no other method of making a post in only a certain board? Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 6, 2009 Share Posted April 6, 2009 So C:\hide_your_stuff\?this_is_what_need_to_see Quote Link to comment Share on other sites More sharing options...
Ashoar Posted April 6, 2009 Author Share Posted April 6, 2009 Sent you a pm with a link to a free host i added it to. Quote Link to comment Share on other sites More sharing options...
roadshow Posted June 22, 2009 Share Posted June 22, 2009 Upload the results so we can check it out. 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.