How to delete a specific array item from PHP session -


One session is attempting to remove an item from the shopping cart. I used no set () Like it did not work

link

  & lt; Td width = "100" & gt; & Lt; A href = "? Id = & lt ;? php echo $ id ;; & gt; and action = delete" & gt; & Lt ;? Php ek $ ide ;? & Gt; & Lt; / A & gt; & Lt; / Td>   

Unset

  if (isset ($ _ GET ['action']) & amp; ($ _ GET [ Verb '] == "delete")) {$ new_id = $ _ GET [' id ']; Not set ($ _ session ['item'] [$ NEW_ID]);    

Unset Sessions See this code result properly array (1) {[" Id "] = & gt; Int (10)}

  & lt ;? Php $ _SESSION ['item'] = array ("id" => 10, "new_id" => 6); Not set ($ _ session ['item'] ["NEW_ID"]); Var_dump ($ _ session ['item']); ? & Gt;    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -