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