Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Dec 2006
    Posts
    9
    Member #
    14443
    I am currently putting together a website for a record label and have been asked to include an area for ads at the bottom of the page (something that i've never been asked to do before). When i started putting together the website i thought that this was something simple that could easily be done with HTML, and that there would only be one single ad displayed, but really there will be multiple ads to be displayed from different companies, with a new one to be shown each time that the page is refreshed. After realizing that simple HTML would not be enough to achieve this i looked around at other sites with this feature in place, discovering that most use ASP to achieve this feature (at least from what i've seen), but the server that this site will be hosted on doesn not support ASP so i found a tutorial for the same feature using PHP and it seems to work great... at least in Firefox. In IE it works once or twice, but if you refresh/view the page a few times it eventually breaks up the table and messes things up (the table stays intact no matter how many times it is refreshed when the PHP code is not there). Anyone know how i can stop this from happening? Whether it is something in the PHP code or the actual html/page layout...

    here is the tutorial that i used to get the php code.

    here is the page that i am having the problem with.

    attached is the the microAdRotator.php file, and here is the adlist.txt file.

    i included this php code at the beggining of the page:
    PHP Code:
    <?php
        
    require_once('microADRotator.php');
    ?>
    and i included this in the table cell where the ads are to be displayed:
    PHP Code:
    <?php showRandomAD(); ?>
    any help would be greatly appreciated. Thanks in advance.

  2.  

  3. #2
    Junior Member
    Join Date
    Dec 2006
    Posts
    9
    Member #
    14443
    now that i look at the source code AFTER the page is loaded in the browser i notice that it adds a <br/> in after the banner, so i'm thinking this could possibly be the problem, but knowing that i still don't know how to make the php code that i have not insert the </br> after the ad... any help on that?

  4. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    Hatfield, England
    Posts
    855
    Member #
    9790
    Change
    Code:
     echo $adList[$actAD].'<br/>';
    to

    Code:
     echo $adList[$actAD];
    to remove the line break

  5. #4
    Junior Member
    Join Date
    Dec 2006
    Posts
    9
    Member #
    14443
    That worked in taking the <br/> out, (thanks Perad!), but the problem still persists.

    I'm pretty sure its something to do with the php code (not the html) in either the microAdRotator.php file or the main.php file.... when i replace:

    <?php showRandomAD(); ?>

    with

    <img src="http://www.ryandgustafson.com/nvtest/redgrnbanner.gif" width="414" height="60" border="0"></a>

    things work just fine, so it is definitely something to do with the php code. Any help?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:12 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com