I have a Banner site in PHP

Discussion in 'PHP' started by Rajnish357, Nov 23, 2011.

  1. #1
    I think it can be done via giving conditions but I don't not exactly how to do that.

    _________________________
    (I want to display 10 banner from 10 different users)

    If the visitors rich the site using an affiliate id, then I want the banners from
    that affiliate to display on the firs 3 spots. If the affilaite does not have banners
    on his account added yet, or does not have all 3, then I want banners from
    admin to fill the remainig spots.

    If the visitor rich the site without and affilaite id, then I want 3 banners from
    admin to display on the firs 3 spots.

    Need spots 4-10 to ramdoly display all members banners.

    -------------------------
    Please help me ASAP
     
    Solved! View solution.
    Rajnish357, Nov 23, 2011 IP
  2. #2
    this can be done like this...(according to what i understood so far)
    user visit link is something like this...
    www.yoursite.com/affiliate.php?affi=1234
    if(isset($_POST['affi'])){
    echo '<img src="www.yoursite.com/images/affiliate_img.png"/>';
    }
    else{
    echo '<img src="www.yoursite.com/images/default_img.png"/>';
    }

    i think you get the idea.
    you can expand/modify it according to your requirements.
     
    c4cyber, Nov 23, 2011 IP