You are here: NEWBIE: sticky select from fields « PHP Programming Language « IT news, forums, messages
NEWBIE: sticky select from fields

Posted by presley2 on 09/27/44 11:33

Hi,
I have a form, with some error checking, that works fine after "submit"
inserting into DB ---but I have a little problem, I cannot seem to make
my "select" fields sticky --I have tried several different solutions
and nothing works. The solution below works for errors (not selecting
from the pulldown) and for inserting into DB ...but does not work if
error checking stops the porcessing ...I want it to remain on the last
selection for user convenience ...but it doesn't ...help!


<select name="session">
<option value="" <? echo ($session=='') ? "" : ""; ?>>SELECT
SESSION</option>
<option value="1" <? echo ($session=='1') ? "selected=" : "";
?>>SESSION 1</option>></select>

<select name="employment_status">
<option value="" <? echo ($session=='') ? "selected" : ""; ?>>SELECT
STATUS</option>
<option value="1" <? echo ($employment_status=='1') ? "selected" :
""; ?>>STATUS 1</option>></select>

 

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

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