Jump to content

Recommended Posts

Hey,

 

I have set $_SESSION['cart']

 

Array ( [sDBVVHR] => 1 [bMNHYR] => 1 )

 

those are in the cart array.. When I send the variable "BMNHYR" across the url.. and try to unset the matching session variable, I cant seem to get it to work..

 

How should it be formated?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/268419-cant-seem-to-unlink-a-session-variable/
Share on other sites

Variables within single quotes are not parsed, so you're literally trying to delete '$code'. You could use double quotes (which are parsed), but there's no reason to wrap just a variable in quotes anyway. Drop the quotes..

First step is to finding out exactly what the variables contain, and verify that it is what you assume/expect it to be.

Second step is to actually post all relevant information, if you want help, so that people don't have to waste time pulling your teeth to get the information they need. You should have been here long enough to know this by know, to be honest...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.