Jump to content

Can I have 'ref123', 'ref456' as references in sessions ?


jasonc

Recommended Posts

Hmm well array key naming rules don't restrict the use of numbers so I couldn't imagine why that key would be giving you trouble when numeric keys aren't. Try doing print_r on session to see what it has in it. You could also try posting your other relevant code to see if maybe there is an error in something you do with the $_SESSION

Link to comment
Share on other sites

I could not for the life of my work out why this would not have worked.  I was sure I had read up that this was possible and continued using this method until I had over 1000 products in my custom cart, then found the bug!!  ouch....!

 

I have found the bug in my code I was checking if the reference is_numeric  before allow the products to be added!

 

Thank you for confirming that this was possible as I was about to redo the whole cart and images, before I found the fault in my code.

Link to comment
Share on other sites

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.