osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Check based on Page address

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 08-01-2005, 05:30 AM
Lurker
 
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
crashfellow
Default Check based on Page address

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!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 08-01-2005, 06:50 AM
Lurker
 
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
crashfellow
Default Solved :D

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 '';
}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 04:43 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax