0

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

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by vssp
0

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);
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.