osCmax v2.5 User Manual
Results 1 to 2 of 2

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

      
  1. #1
    Lurker
    Join Date
    Jun 2005
    Posts
    4
    Rep Power
    0


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

  2. #2
    Lurker
    Join Date
    Jun 2005
    Posts
    4
    Rep Power
    0


    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 '';
    }
    ?>

Similar Threads

  1. What's up with the hanging ?> on Edit Address Page
    By Dubious in forum osCmax v2 Installation issues
    Replies: 2
    Last Post: 10-13-2006, 09:19 AM
  2. PayPal email address error check in affiliate_signup
    By ganast in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 08-24-2005, 08:51 AM
  3. Setting up Table based shipping based on price
    By royjones in forum osCmax v1.7 Discussion
    Replies: 5
    Last Post: 04-14-2005, 06:19 PM
  4. add address/phone to contact us page
    By gre_soul in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 04-08-2005, 09:11 AM
  5. Address book address line ordering
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 11-29-2003, 04:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •