| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| I need a code to allow me to have alternate; images each time my homepage is loaded | |
|---|---|
| Tweet Topic Started: Jan 26 2005, 02:50 PM (338 Views) | |
| madonnasworld | Jan 26 2005, 02:50 PM Post #1 |
|
Member
![]() ![]() ![]() ![]()
|
anyone have it? thanku so much |
![]() |
|
| FearKiller | Jan 26 2005, 04:35 PM Post #2 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
So you want a code that will load a different image if the primary image fails to load, correct? |
![]() |
|
| Zach | Jan 26 2005, 04:47 PM Post #3 |
|
Missjayness
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
No, I tinhk he means something that just randomly chooses a different logo every time the page is loaded. Kinda like this: audioscrobbler.com (the random text near the logo) but with images. |
![]() |
|
| Jory | Jan 26 2005, 05:33 PM Post #4 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
dunno exact code, but its something like: img = rand(1000) if(img==1){<img src=img1} else{ if(img==2){<img src=img2} else{ if............... rand(x) takes a random number between 0 and x (again, not exact code, but it does work (have file with code like this at school, if i remember, all post it) ) |
![]() |
|
| FearKiller | Jan 26 2005, 05:39 PM Post #5 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yea well he said "alternate" so I think he would mean alternate not random. Well, if you do want a random image code and in PHP, seeing as you didn't post what language you wanted it in either, then here it is.
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
7:04 AM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)



7:04 AM Jul 11