What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » php/css switcher...?

php/css switcher...?
Author: Message:
joey
Senior Member
****

Avatar
Epoc Faileur.

Posts: 734
Reputation: 26
33 / Other / Flag
Joined: Dec 2006
O.P. Tongue  php/css switcher...?
im [trying to] make a css switcher for my site using php, and i suck at php still XD

why wont it work?
this is in the head section -


code:
<?php
$myStyleColour = $_POST['styleColour'];

if($myStyleColour=="red"){
    print '<link rel="stylesheet" type="text/css" href="css/styles2.css" />';
    } else{
    /*if($myStyleColour=="normal")*/
    print '<link rel="stylesheet" type="text/css" href="css/styles.css" />';
    }
?>

and this is in the body -

code:
<input type="radio" name="styleColour" value="red" onselect="<?php
print "$myStyleColour"; ?>">Red<br>
<input type="radio" name="styleColour" value="normal" onselect="<?php
print "$myStyleColour"; ?>">normal<br>


any help would be appreciated, and no doubt its something stupid/obvious/is a syntaxical error :P

This post was edited on 02-08-2008 at 01:25 PM by joey.

Break my heart all you want, i'm on the NHS.
ever wondered what it's like to ejaculate through your ears...? ;o
02-08-2008 01:24 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
php/css switcher...? - by joey on 02-08-2008 at 01:24 PM
RE: php/css switcher...? - by ShawnZ on 02-08-2008 at 01:27 PM
RE: php/css switcher...? - by joey on 02-08-2008 at 01:30 PM
RE: php/css switcher...? - by Ezra on 02-08-2008 at 03:53 PM
RE: php/css switcher...? - by ShawnZ on 02-09-2008 at 10:15 AM
RE: php/css switcher...? - by joey on 02-09-2008 at 04:54 PM
RE: php/css switcher...? - by ShawnZ on 02-09-2008 at 07:49 PM
RE: php/css switcher...? - by Fruit on 02-10-2008 at 07:47 PM
RE: php/css switcher...? - by joey on 02-16-2008 at 08:37 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On