Psycho-Path Posted December 26, 2006 Share Posted December 26, 2006 Ok I have my site set so so the index.php reads the rest of the .php files and puts their contents into a certain part of index.php, right? ill give an example of the code im using.[code]<?$val = $_GET['id'];$val .= ".php";$dirty = array("..");$clean = array("");$val = str_replace($dirty, $clean, $val);if (isset($_GET['id'])) {if (file_exists($val)) {include "$val";}else {include "404.php";}}else {include "news.php";}?>[/code]so anyways I followed a tut on forums ( I think I got it from here ) and so I have the forums index done - index.php?id=forums so it looks fine, well I have a problem b/c the way these forums are made it of course sets numbers for posts made, so you would think that I would use index.php?id=message but no, it would need to be something like index.php?id=message&id=1 so it knows which reply it is using or else it just looks at message.php rather than message.php?id=1 which is what I need.so please help meThanks,Andrew Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted December 26, 2006 Share Posted December 26, 2006 change your variable names!use maybe mode=message&id=xyz then just change your code to recognize the correct part ($_GET['mode']) Quote Link to comment Share on other sites More sharing options...
Psycho-Path Posted December 26, 2006 Author Share Posted December 26, 2006 Thanks alot man. 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.