Jump to content
xisto Community
Sign in to follow this  
NeXDesigns

Simple Php Get Script

Recommended Posts

I used this code in my index.php (click here to view)

         <?php[br]switch( $_GET['page'] ) { [br][/br]    case 'news' : [br][/br]        include 'news.php'; [br][/br]        break; [br][/br]    case 'faq' : [br][/br]        include 'aboutus.php'; [br][/br]        break; [/br]  [br]    case 'tutorials' : [br][/br]        include 'tut.php'; [br][/br]        break; [/br]  [br]    case 'ps7' : [br][/br]        include 'ps7.php'; [br][/br]        break; [br][/br]    default: [br][/br]        include 'news.php'; [br][/br]        break; [br][/br]}[/br]?> [br]

to make the center include change to whatever the input it (like index.php?page=404)

But, it only works on the news page and on the FAQ page, everything else goes back to the news page.

I cant figure out why it is doing this[/br]I used http://forums.xisto.com/no_longer_exists/?page=faq and it works, but when i use http://forums.xisto.com/no_longer_exists/?page=tutorials it goes back to the news page.

Please help if you can.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.