User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,802 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,431 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1243 | Replies: 2
Reply
Join Date: Jul 2006
Posts: 176
Reputation: vssp is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 4
vssp vssp is offline Offline
Junior Poster

Solution How to rotate top page banner using php

  #1  
Aug 19th, 2006
Hai friends,


I am very confused this task. please help me.
if five banners are stored in one location , I want to displayall the banners simultaniously in my application.

How to rotate the webpage top banner ? In my application i am getting the immage details using database.

Please send me any idea.
__________________
Thanks
Vssp
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Location: North East Indiana
Posts: 491
Reputation: Puckdropper is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 20
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: How to rotate top page banner using php

  #2  
Aug 19th, 2006
Here's a rough idea of one way you can do it.

function change($current_banner)
  {
  $number_of_banners = 5;
  if ($current_banner < $number_of_banners)
    {
      $current_banner++;
    }
  else
    {
      $current_banner = 0;
    }
  return $current_banner;
  }

function get_filename($current_banner)
  {
  select $current_banner
  {
     case 1:
       $filename = "thebannername.jpg";

...

  }
}

//Display the banner

//Get filename
$filename = get_filename($current_banner)
//Use filename in HTML
echo "<img src=\"" . $filename . "\">";
//Go to next banner
$current_banner = change($current_banner);
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote  
Join Date: Jul 2006
Posts: 176
Reputation: vssp is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 4
vssp vssp is offline Offline
Junior Poster

Re: How to rotate top page banner using php

  #3  
Aug 21st, 2006
Thanks for your replay
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:27 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC