Click to See Complete Forum and Search --> : Another thread about Session variables


dirt29
03-20-2008, 04:06 PM
Ok, I know this is a topic that has been beat to death here and other web developer sites I've visited. I've seen alot of varying information in regards to passing session variables between pages.

In my particular case, I am passing them through a include file. The majority of the time it works, but sometimes it fails. I've spent many hours trying to figure out when & what is causing it. And it seems to be on instances where they hit the back button or at times when I use JS validation.

So can someone give me a clear cut answer(if there is one). Is it best not to use them, would cookies be a better alternative? Or if so, is there a solid way to pass it between pages?

I am run this on IIS6 by the way, and these items are pulled from the DB when they hit the main page and then simply displayed in this include file, which is at the top of each page.

Any suggestions would be greatly appreciated.

yamaharuss
03-29-2008, 03:33 AM
Session variables are in essence no different than cookies in that they either exist during a session or they don't. If you are losing session variables or they are changing then it's because you are changing them in your code somewhere.

You'll need to explain further or post your code.