Welcome visitor
* Login
* Register
It is currently January 22nd, 2019, 8:54 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Server Side » PHP



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Button that changes variable value
PostPosted: February 7th, 2009, 8:20 pm 
User avatar

Posts: 71
Hi, im looking for a script which changes the value of a variable by pressing a button. For example a variable named $style1 with a value of "default.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. Thank you!


Top
 Profile  
 
  Re: Button that change variable value
PostPosted: February 7th, 2009, 8:28 pm 
User avatar

Posts: 52
Well, if you are only using two different style sheets you may use a form with the action pointing to the same file with a var in the URL, so when it loads the page it may extract the GET and set the propper style. But if you wanto have maaany styles options, it would be easy to use regular links, with vars on the URL or a dropdown menu in a form.
Cheers ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Server Side » PHP


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron