Jump to content

[SOLVED] Remember Drop down box Selection


cmr

Recommended Posts

Is there a better way to do it than i currently am using?

 

Simply echos the value in the selected option that will otherwise be blank, so this makes it impossible for the user to select no input. Any help much apreciated.

 

$e_s_y  = $_POST['frm_e_s_y'];

 

<select id="frm_e_s_y" name="frm_e_s_y">

<option selected="selected"><?php echo $e_s_y ?></option>

<?php

for($i=2007,$a=2015;$i<=$a;$i++)

{

echo "<option>$i</option>";

}

?>

</select>

Link to comment
https://forums.phpfreaks.com/topic/77604-solved-remember-drop-down-box-selection/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.