Msg#: 4380378 posted 5:50 pm on Oct 28, 2011 (gmt 0)
To get one thing out of the way: are you using an XHTML doctype or HTML/HTML5?
For HTML, it's
<option value="some-value" selected>
for XHTML, it's
<option value="some-value" selected="selected">
i want after the drop down choosed by user, it will add SELECTED next time they opening the drop down again
You **should** have these select lists generated by a function, but this simple example assumes this form is using POST as a method. I don't use form arrays often, doesn't look like you need them, so to avoid "incorrect code" I'm using a static name. Change the names as needed . . .
$using_xhtml = 0; // because most of us don't need to . . $selected_syntax=($using_xhtml==1)?' selected="selected"':' selected'; } $vals = array ('1','2','3','4');