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

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -