Session Handling And Empty Fields

liunx

Guest
I've been having a problem on our site off and on and I think I've pinpointed it to something with cookies, but I wanted to get a second opinion.<br /><br />I've got a custom cart designed on our site and every now and then, an order will come through just fine, but some information will be missing. Or, other times, the entry will get put into the database, but every field will be null. Same thing occurs for member signups as well. To attempt to find out why this was occuring, I'm now checking browser versions and logging anything put into database with that information. So far, there has been no relation as different browsers have the same problem.<br /><br />The odd thing is that I can't recreate this at all. I've tried time and time again to recreate the problem and I can't make it happen. Everytime I do anything as far as signup or buy, it works perfectly.<br /><br />My theory is that since sessions still require cookies to be enabled, some people don't have them enabled, and its causing problems. Either that, or there are momentary hiccups when the code tries to enter things into the database.<!--content-->
I suppose the answer is "yes" but have you tried disabling cookies on your browser and see if that's the cause of the problem?<!--content-->
I tried that but my error-checking picks up empty data in required fields and puts me right back to the form. <br /><br />I think I might have found the problem, though. Apparently, when using the header() function, there some issues with session data transferring correctly. Using session_write_close() before initiating a header change will write all current session information to disk first. It should do this automatically as the header changes, but sometimes it doesn't.<br /><br />I'll try this and see if it makes a difference.<!--content-->
Sorry I couldn't help you more, I never had those problems with sessions :\<br /><br />But I'm glad you found a possible solution. Let me know how it goes <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
 
Back
Top