Log In · Register

 
randomly select html code
F-Disk
post Dec 29 2005, 12:10 PM
Post #1


Newbie
*

Group: Member
Posts: 1
Joined: Dec 2005
Member No: 336,967



well i dont know if this is possible with html or java but what i want to achieve is something along this line

a random number or something is bpicked and lets say thats between 1-3

i want something like tyhis

Case 1
Uses html code in here
Case 2
Use html code in here
Case 3
use html in here

what im trying to achieve is have multiple themes on myspace and have them alternate randomly everytime someone visits my profile
 
 
Start new topic
Replies
*mipadi*
post Dec 29 2005, 04:08 PM
Post #2





Guest






You probably can't do it on MySpace, but it's possible to do it on some other site which allows the use of PHP. It's fairly simple, in fact. You'd just have to put this code in your <head> section:
CODE
<?php
$select = rand(1,3);
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"style$select.css\"/>\n";
?>

Assuming your stylesheets where named "style1.css", "style2.css", and "style3.css".
 

Posts in this topic
F-Disk   randomly select html code   Dec 29 2005, 12:10 PM
Kristinaa   A theme switcher? Idk if they have it for myspace...   Dec 29 2005, 12:33 PM
toyo loco   On Myspace I don't think thats possible. Unles...   Dec 29 2005, 12:37 PM
mipadi   You probably can't do it on MySpace, but it...   Dec 29 2005, 04:08 PM
Programmer   ^ damn solved it before i could say anything !   Dec 29 2005, 04:37 PM


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: