Page 1 of 1

Session problem

Posted: Thu Nov 24, 2005 10:43 am
by diane1
I have three forms. Some of the info is the same on each form. The use can submit from one page the click a link to go to another page. I have the session variables working so that the info from Page 1 shows in page 2, etc. I want user to be able to make changes from any form.
Problem is; Everything is working except if the user highlights text in input box then hits delete button then hits enter button. The variable remains. If user highlights text then hits the spacebar the text is cleared.(which is what I want when they use the delete button).

Any suggestions?

Posted: Thu Nov 24, 2005 2:15 pm
by Chris Corbyn
OK I get what you're saying but I can't see any reason why that would happen other than a logic problem :?

Can you post the code please?

Posted: Thu Nov 24, 2005 2:16 pm
by trukfixer
I would simply check all POST values for null or empty , and if so, see if $_SESSION['key_name'] has a value, and if it does, set $_SESSION['key_name'] = "";

Posted: Fri Nov 25, 2005 5:45 am
by diane1
Turns out I was not checking if my variables were set correctly. Thank you both for your comments. I got me rethinking my logic.