You are here: Re: How to modify CSS with PHP? « PHP Programming Language « IT news, forums, messages
Re: How to modify CSS with PHP?

Posted by Adam on 09/03/06 14:43

On Wed, 23 Aug 2006 12:26:17 -0700, deko wrote:

>>> How do I get it to stick with the user's choice on post back? Do I have to
>>> grab
>>> that value with PHP code and then set the combo default manually? How?
>>
>> Yes, you will need to set the selected option manually.
>> Try something like this:
>>
>> <form name="bgcolor" action="http: // www . example . com/ks123/?p=85"
>> method="post">
>> <select name=color onChange="bgcolor.submit()">
>> <option value=white
>> <?=($_POST['color']=='white'?'selected':'')?>>white</option>
>> <option value=yellow
>> <?=($_POST['color']=='yellow'?'selected':'')?>>yellow</option>
>> </select>
>> </form>
>
>Unfortunately, I cannot do that in my current situation, but thanks for the tip.
>I may use that elsewhere.

Just to add to this thread - that I occasionally use PHP to get the
browser version (in case JS is turned off) so that I can import
different sets of (accordingly tweaked) stylesheets. It's a bit of a
kludge though, I think.

Adam.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация