Closed Thread Icon

Topic awaiting preservation: PHP, switch and includes? Pages that link to <a href="https://ozoneasylum.com/backlink?for=21500" title="Pages that link to Topic awaiting preservation: PHP, switch and includes?" rel="nofollow" >Topic awaiting preservation: PHP, switch and includes?\

 
Author Thread
CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 04-22-2004 16:29

Holy shit! You all changed this place. Nice that you got the grail up on the main pages.

So...i have a little issue...

I have a page that i am using php includes and a switch statement to switch between the pages.

I have tested this on my computer at home and everything worked fine. But when I uploaded them to works server, the pages don't show up for the links.

Here is the page that isn't working.

and here is a copy of it in text format since it's a php page.

See anything that stands out to you. I am guessing that the server allows includes since the main.php page is showing up, just the links are not pulling in the different pages.

Later,

C:\


~Binary is best~

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 04-22-2004 16:51

At first sight, it looks like a REGISTER_GLOBAL problem. Try to replace :

code:
switch ($link)

by

code:
switch ($_GET['link'])

And put some quotes around the values in the case statements unless they are some DEFINE done somewhere in an include.

Hope that helps,



(Edited by poi on 04-22-2004 07:55)

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 04-22-2004 16:55

you got it poi! dang....i knew i shouldn't have stayed up until 4am last night

thanks a bunch!

Later,

C:\


~Binary is best~

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 04-22-2004 18:18

and turn off register_globals on your development machine, so that this won't happen next time.

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 04-22-2004 19:17

will do TP

Later,

C:\


~Binary is best~

« BackwardsOnwards »

Show Forum Drop Down Menu