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

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.

Archived

This topic is now archived and is closed to further replies.

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