For the option to turn styles off and on, I'm using this little snippet:
Reading all that crazyness made my brain hurt. C++ is so much more...normal
I KNOW Liz has seen this thread.... I just don't know if he knows the answer.
Rugg
well what you could do is decide what you would like to have set by default. If you want css on by default you should then just simply write some code that says something like.
<?php
if (isset($_GET['css'])) {
$headercss = "<link rel="stylesheet" href="style.css" type="text/css" />"
$linktext = "<a href=blah.php?css=false">Styles Off</a>"
} else {
$linktext = "<a href=blah.php">Styles On</a>"
}
?>
And place the appropriate $variables where ye need them to be.
Thanks for the edification, Msr. Lizard. 'Twould be on by default. I'll try it.
Please forgive my PHP illiteracy, but how might one write those appropriate variables when placing them? Also, I'd like "off" to refresh any page the user happens to be on and have it stay that way until the "on" link was clicked again (from anywhere), but I'm thinking a cookie would be necessary to carry the preference. Will this code avoid that?
For the variables, all you have to do is place that bit of code (its not 100% syntax correct) near the top and place the header variable in the header and the link variable where the link is
html <?php echo $linktext; ?> morehtml
and for the persistant memory, you are gonna want to look into sessions. Unfortunately I am not the master of sessions so I can't help much there
Ah, dat's ok. Should have seen the sessions coming, but I have a lifeline for those. Thank you ever so much!
~ Infi
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (WDYL-WTN Release)