Button to change variable string value
Posted: Wed Aug 02, 2006 11:21 am
Hi all,
I'm currently looking to make a simple php script for my site which changes the value of a variable with the press of a button. The script is aimed at changing the CSS stylesheet of my site with a different one the way I 'd like to do do this is by using an echo of a variable inside the stylesheet path in the head tag.
For example a variable named $style1 with a value of "main.css", and when the button is pressed the value of $style1 changes to "second.css" therefore changing the path to the css file to a different path and reloading the page with that style on.
Any ideas on how I could achieve this? Bare in mind I want to keep the script very simple.
Thanks for any help in advance,
Andy C
I'm currently looking to make a simple php script for my site which changes the value of a variable with the press of a button. The script is aimed at changing the CSS stylesheet of my site with a different one the way I 'd like to do do this is by using an echo of a variable inside the stylesheet path in the head tag.
For example a variable named $style1 with a value of "main.css", and when the button is pressed the value of $style1 changes to "second.css" therefore changing the path to the css file to a different path and reloading the page with that style on.
Any ideas on how I could achieve this? Bare in mind I want to keep the script very simple.
Thanks for any help in advance,
Andy C