forms - PHP: Retaining drop down fields in new page -
i have 1 page displays form various dropdowns being populated dynamically.
snippit
<td valign="top"> <select name="status"> <option></option> <?php foreach($statuslst $status){ echo '<option value=' . $status[0] . '>' . $status[1] . '</option>'; } ?> </select> </td>
i have 2nd page displays form results form. first form posting 2nd , 2nd posting itself.
i want items chosen in first form selected when posted second form.
can steer me in right direction here?
thanks,
jonesy
taken form type, on second page:
<?php foreach($statuslst $status){ $var = ''; if($_get['status'] == $status['0']){$var = ' selected="selected"';} echo '<option value="' . $status[0] .'"'. $var .'>' . $status[1] . '</option>'; } ?>
Comments
Post a Comment