I have two session say A & B
both sessions only have numerical data entered in them
both sessions get the data removed (unset) from them in the exact same way by the same file
session A gets its data from a db query (table ID)
session B gets its data from a user text input (form)
but only session A will unset?
is there any way it's something to do with the data being from a form?
an example of session B
Array ( [12] => 1 )
now if I use the unset it does this:
Array ( [12] => 1 [] => )
obviously not removing, almost like its ADDING to it without data?
again, both sessions get the data removed in EXACTLY the same way obviously with different parameters, but they have been checked 200 times
I've even tried removing the unset code for session A and is the same result
I have checked many times the code, so I can only presume there is something about sessions I dont yet know
any ideas?







Triexa.com posted this at 16:39—3rd October 2007.
They have: 178 posts
Joined: Feb 2005
I would suggest stripping it down to the core of what you want to do - set the sessions, then unset them... and see the result. If it's different from being within all your other code then you have something else happening that is messing it up. If it's the same result, then please pastebin the simple "test case" file. (http://www.pastebin.com)
SonicMailer Pro - Professional mailing list manager & award-winning email marketing software
Download a FREE 30-day trial today!
Use coupon
savemoreon4and save 10%!greg posted this at 13:44—5th October 2007.
He has: 477 posts
Joined: Nov 2005
thanks for replying.
I spent ages looking for the problem. nothing was reporting an error. i used php files checkers like what you suggested all said the code was fine
I went through the code meticulously and found nothing
the problem is I have several sessions doing various things in several pages within whiles and loops in php files with 70-80 lines of code in them and the problem could have been at any point of it all
I found it in the end though
I missed an "=" in a form, so the data being sent to a page that added or removed to or from the session in question wasnt getting any data to remove
a simple equals sign missing
Cheers
www.worldwide-web.co.uk
www.hotnews-4u.com
gos1 posted this at 14:04—22nd October 2007.
They have: 10 posts
Joined: Oct 2007
is it possible for me to see the whole code please then I can tell you =
Post your hi-tech jobs to http://www.coderelector.com [----Protects webmaster Rights----]
Find freelancers at http://www.coderelector.com [----Protects webmaster Rights----]
Extra income http://www.coderelector.com [----Protects webmaster Rights----]