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

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);

Thanks for your replay

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.