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>