Jump to content

Problem


Psycho-Path

Recommended Posts

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 me

Thanks,
Andrew
Link to comment
https://forums.phpfreaks.com/topic/31906-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.