![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
|
change picture
Hey guys I was windering if anyone knew of a way, with out flash, to make an image change when someone refreshes a page. I have four images that I would like to rotate everytime someone visits the page. Thanks.
__________________
"If it's really a supercomputer, how come the bullets don't bounce off when I shoot it ?" <<PC Pitstop>><< AVG Free>><<Spybot>><<Everest 2.0>><<Trend Micro House Call>><<HijackThis How-to>> |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#3 (permalink) |
|
Design Team
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)
|
I know of a javascript code from javascript.internet.com and I know of a PHP script that uses cases.
Here is the one I recommend (php): HTML Code:
<?php
srand( microtime() * 1000000 );
$num = rand( 1, 3 );
// change the 4 to the total number of ads you have
switch( $num )
{
// These are the banners
case 1 : $img="image url"; $url="link url"; break;
case 2 : $img="image url"; $url="link url"; break;
case 3 : $img="image url"; $url="link url"; break;
// for another ad just copy one of the above code and change the 4 in rand( 1, 4)
}
// This is the output script
$banner = "<center><a href=\"$url\" target='_blank' alt='Advertisement'> ";
$banner.= "<img src=\"$img\" ";
$banner.="border=\"0\" alt=\"Click me!\"></center>";
$banner.="</a>";
echo( $banner );
?>
__________________
Nice music blog ![]() Nvu || Notepad++ || Apache || PHP || Keep TSF Alive "The great thing about a computer notebook is that no matter how much you stuff into it, it doesn't get bigger or heavier." |
|
|
|
![]() |
| Thread Tools | |
|
|