Php Session Array - Updated Session Array not showing up in the listbox -


what looking listbox refreshed $_session data. first inital load, loads fine. when select option want removed , click on submit. $_session modifys perfectly.

--- index.php --- <select name="listbox" size="5" height="500px;"> <?php $array_length = count($_session['listmodify'][0]); if(isset($_session['listmodify'][0])){   ($i = 0; $i < $array_length ; $i++) {     echo '<option value="' . $_session['listmodify'][0][$i]['sku'] .','. $_session['listmodify'][0][$i]['qty'] . '">' . $_session['listmodify'][0][$i]['sku'] . ' - ' . $_session['listmodify'][0][$i]['qty'] . '</option>';   } }  ?>  </select> 


--- delete.php ---

$listsku = $_post['listbox']; $key = array_search(trim($listsku), array_column($_session['listmodify'][0],"sku")); unset($_session['listmodify'][0][$key]); $_session['listmodify'][]=array_values($_session['listmodify'][0]); header("location: index.php"); exit(); 

these images show looks like.

enter image description here

enter image description here

any ideas on need listbox show updated $_session data?


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -