twins0203 Posted November 21, 2007 Share Posted November 21, 2007 Hey everyone, I'm building an ecommerce store and I'm wanting an image to load at the top of the page only on the homepage. How should the code be written so if the user is on the homepage(index.php) the image will show, but when they go to another category or product page the image won't be there? I've tried to find an if/then statement, but haven't been able to get one to work. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
revraz Posted November 21, 2007 Share Posted November 21, 2007 Not sure what you mean. Only put the header on that one page, if you don't want it to show on others. Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 21, 2007 Share Posted November 21, 2007 if (basename($_SERVER['REQUEST_URI']) == 'index.php'){ //load the image } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.