Jump to content

PHP Help needed!


cjohnson202

Recommended Posts

Hello everyone, I am very new to the world of PHP and thus why I am here!  I would really like some help on a problem I've been trying to fix for a week but have had no luck.  I own a website called hockeyleaks, here is the link: http://www.hockeyleaks.com

 

On the left column, everything below the button ad (but not including it) is a seperate php file called ads.php.  My advertisers have requested their ads to only be shown on the main page, but the way my site is set up that ads.php file remain on all pages.  Could anyone modify my script to make the ads.php go away when any of the top nav links are clicked?  I would forever be in your debt!

 

I have attached the index.php file, any help would be greatly appreciated! 

 

[attachment deleted by admin]

Link to comment
Share on other sites

As all your other pages are called from the $_GET['page'] variable you could use this as a condition.

 

Not had a look at the code but guess I dont need to. Easy

if(!strlen($_GET['page'])) {
include('ads.php');
}

 

Exactly what I did in my edit. I just used isset() instead.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.