help

Status
Not open for further replies.

Cynical

Active Member
Messages
3,492
Reaction score
0
Points
36
On your index page, have it first check the variable in the URL by using something like this:
PHP:
$PAGE = $_GET['page];
Next, for each page you have, you need to have index.php do something with it:
PHP:
if ($PAGE=='testpage') {
//?page=testpage. Here is the "testpage" page.
} elseif ($PAGE=='lolz') {
//?page=lolz. Here is the "lolz" page.
}
Does that make sense? Between each bracket pair put the PHP to be executed for that page.

EDIT: It appears I've found an error in the forums... disregard the 'BEGIN__VBULLETIN__CODE__SNIPPET' things in the above codes, I don't know why they are there... I also didn't put the <?php things in there either, so disregard those, assuming you know how to use those tags.
 
Last edited:

jensen

Active Member
Messages
1,168
Reaction score
22
Points
38
One option is to rename all your html files to PHP and it works just fine. Also when you have a link just make sure the name is changed to .php what do you mean by full links?

Are you using a CMS that's why you want it with that index.php?page=test
 

Cynical

Active Member
Messages
3,492
Reaction score
0
Points
36
I wasn't implying you had a forum, I mentioned that this forum had an error (which is why the "BEGIN__VBULLETIN__CODE__SNIPPET" appears in the code I mentioned above.
 
Last edited:

jensen

Active Member
Messages
1,168
Reaction score
22
Points
38
http://www.netcode.net/tutorials/php_mysql/ has a specific answer to your question.

Hope you are doing well with your friend's help. Didn't realise that there would be a simpler way than just a direct link. To look "cool" you have to add so much more code. I wonder if it's worth the effort? Remeber, content is as important if not more important than looks
 
Status
Not open for further replies.
Top