This is a discussion on Check based on Page address within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, im hoping someone can help me. Basically, i have set up some code into the index.php page, in a ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi, im hoping someone can help me. Basically, i have set up some code into the index.php page, in a way i probably shouldn't have, but im looking to make it so that if the user is on the index.php page (the initial page) then they see it. And if they're in categories or something they dont. I know what i want to do, but im unsure of the code. Basically i need it to check for the string "index.php?" from the URL it's currently on and display the code. (html code) Otherwise just echo/print something. If possible it would be great to be able to do something where and else if statement is in place, looking for "index.php/cPath" so that i can get different code to display (html code) Im sure this is possible, but im not a PHP developer. Thanks for your help!! |
| Sponsored Links | ||
| ||
| |
|
#2
| |||
| |||
| I ended up going around the net, and slowely but surely put code together. it's tough when you dont even know what you're searching for... but i got it. So here it is, incase anyone else is a simple as me lol <?php $current_url = $_SERVER['PHP_SELF']; if(stristr($current_url, 'index.php/cPath') === FALSE) { require(DIR_WS_INCLUDES . 'index_main_pictures.php'); } else { echo ''; } ?> |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What's up with the hanging ?> on Edit Address Page | Dubious | osCMax v2 Installation issues | 2 | 10-13-2006 09:19 AM |
| PayPal email address error check in affiliate_signup | ganast | osCMax v2 Customization/Mods | 0 | 08-24-2005 08:51 AM |
| Setting up Table based shipping based on price | royjones | osCMax v1.7 Discussion | 5 | 04-14-2005 06:19 PM |
| add address/phone to contact us page | gre_soul | osCMax v1.7 Discussion | 1 | 04-08-2005 09:11 AM |
| Address book address line ordering | Anonymous | osCMax v1.7 Discussion | 2 | 11-29-2003 04:54 PM |