naveed.qasim Posted August 30, 2010 Share Posted August 30, 2010 Hi i'm new to php. I want to get all the values of dropdown list on another page wether selected or not. Link to comment https://forums.phpfreaks.com/topic/212041-getting-all-dropdown-list-values-using-php/ Share on other sites More sharing options...
Pikachu2000 Posted August 30, 2010 Share Posted August 30, 2010 The values that aren't selected aren't passed to the next script, so you'll have to pass them explicitly, or just use the same method you used to get them for the first script. Link to comment https://forums.phpfreaks.com/topic/212041-getting-all-dropdown-list-values-using-php/#findComment-1105040 Share on other sites More sharing options...
naveed.qasim Posted August 30, 2010 Author Share Posted August 30, 2010 Actually my code is: <html><head> <script language="javascript"> function moveItem( box1, box2 ){ for ( var i=0; i < box1.options.length; i++ ){ if ( ( box1.options.selected == true ) ){ strItemToAdd = box1.options.text; box2.options[box2.length] = new Option(strItemToAdd); box1.options = null; i--; } } } </script> </head><body> <form id="project" name="project" action="" method="POST"> <select id='emp_list' name='emp_list[]' size='5' STYLE="width:170;" multiple onDblclick="moveItem( project.emp_list, project.sel_list)"> <option value='a1'>a1</option> <option value='a2'>a2</option> <option value='a3'>a3</option> </select> <select id='sel_list' name='sel_list[]' size='5' STYLE="width:170;" multiple onDblclick="moveItem(project.sel_list, project.emp_list )"> </select> <input type='submit' name='submit' value='submit'> </form> So how can i get all the values from sel_list on the other page Link to comment https://forums.phpfreaks.com/topic/212041-getting-all-dropdown-list-values-using-php/#findComment-1105043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.