summitsource Posted October 15, 2002 Posted October 15, 2002 Hey gang, I need to have different boxes displayed depending on which page is loaded. I use to do it with an if and else but can not remember how, its been a while since ive worked with php and OSCommerce. Can anyone help. TIA Steve :!:
burt Posted October 16, 2002 Posted October 16, 2002 http://uk.php.net/manual/en/control-struct...ctures.else.php http://uk.php.net/manual/en/control-struct...ures.switch.php <-- better
summitsource Posted October 16, 2002 Author Posted October 16, 2002 Here is an example of what im trying to do, if on index.php display these links otherwise display the original links in the headernavigation. what am i missing. <?php if (substr == index.php) { ?> <td class="headerNavigation">different links</td> <td align="right" class="headerNavigation">different links</td> <?php } else { ?> <td class="headerNavigation">original links<td> <td align="right" class="headerNavigation">original links<td> <?php } ?> TIA Steve
Ajeh Posted October 16, 2002 Posted October 16, 2002 You could use: strstr($PHP_SELF,'index.php') or strstr($_SERVER['PHP_SELF'],'index.php') in your IF statement.
summitsource Posted October 16, 2002 Author Posted October 16, 2002 Thanks lInda, That is what i was looking for i was missing the php_self, I feel like an idiot now. Thanks again. Steve :P
Recommended Posts
Archived
This topic is now archived and is closed to further replies.