Kano Posted March 7, 2007 Share Posted March 7, 2007 Hi there, How does a script remember selected qty when the user needs to edit an order form. echo"<select name ='blar'>"; for($num;$num<$num2;$num++) { echo"<option value = '$num'"; ........................... // here needs to be selected = 'selected' at the correct place????? echo">$num</option>"; thanks. } echo"</select>"; Quote Link to comment https://forums.phpfreaks.com/topic/41631-remember-selected/ Share on other sites More sharing options...
redarrow Posted March 7, 2007 Share Posted March 7, 2007 from a database or session's or both? Quote Link to comment https://forums.phpfreaks.com/topic/41631-remember-selected/#findComment-201702 Share on other sites More sharing options...
Kano Posted March 7, 2007 Author Share Posted March 7, 2007 The select name is taken as a product id from the database, the option values are a count. The user selects product qty's on a list then processes the order, they are then asked to confirm or cancel/edit order, on cancel/edit order the user is taken back to the previous form in the remembered state to edit. I wish to have the select inputs to remember which value was selected between 0 and highest number. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/41631-remember-selected/#findComment-201707 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.