Jump to content

IF it's this page DO, else DONT


zonkd

Recommended Posts

I'm trying to use an IF ELSE to say that is the page is

 

www.mysite.com/index.php

 

then use these includes. But if the page is

 

www.mysite.com/index.php?page=3

 

or ANY alternative to the straight forward naked index page, please DON'T include it.

 

Does anyone know how to perform the trick, please? I've been trying with every variation I can think of, but I can't find the right combination for the function to work.

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/101839-if-its-this-page-do-else-dont/
Share on other sites

No, I haven't, Chigley, and thanks very much for the suggestion. I'm struggling to see what will go where with it, though. Do I put the address that's wanted into the quotes?

 

You don't need to put anything in the quotes. Just stick it at the top of your current index.php

Thanks very much, ohdang888, that looks good and will be really useful. On this particular project, there's just the one need for it, and mainly because many files use the index page (you know, ?page=2, etc). Usually I can use get_id.

 

But this code of yours look really handy. Much obliged. Cheers.

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.