
12-04-2006, 07:26 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Aug 2004
Location: Chicago
Posts: 68
|
|
Web development help please, this is baffling the crap out of me
ok, I have a site that's using a signup form for people to enter a bunch of information, then I'm storing it in session variables until the final submission, when I then insert it all into the database in 1 shot. The point of this is to keep from cluttering up the database with half-entered forms and whatnot.
What I've found, when using IE7 to do the signup form, for some odd reason that I haven't been able to determine, the session value "username" (e.g. $_SESSION['username']) keeps getting reset from what's posted from the form values to the string "iecssfix".
I have put echos into the pages to see what's in the session values, and what is being sent to the page through http post, and there's nothing in the post itself that would be doing this. I've also did a grep on the entire directory structure of the website's account, and that string does NOT appear in any file in the entire site.
Google has 0 hits for the string "iecssfix", so I'm struggling here. I've talked to 2 other developer friends, and neither of them can figure out where the hell it's coming from either.
This only happens with IE of course, but it has to be supported on this site, so I'm lost... has *anyone* ever seen this?
Thanks
|

12-05-2006, 02:04 AM
|
|
Community Guide
|
|
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
|
|
I cannot replicate your problem on IE7 here. Please give a simple test case of what you are experiencing.
I tested it by creating a form, then submitting it via post to another PHP script, where I store the information in a session, then checking the session in a third script and I didn't see the bug you mention (I also stored it in 'username').
__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise
|

12-05-2006, 02:08 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Aug 2004
Location: Chicago
Posts: 68
|
|
https://www.wetrainamerica.com/signup.php is the page that the problem exists on.
if you go through the steps (just put in bogus info if you want), after the second page you'll see the error. The top 2 arrays that are being echoed are session and post, top and bottom respectively
|

12-05-2006, 02:20 AM
|
|
Community Guide
|
|
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
|
|
That doesn't help me much, unless you show me the code.
Edit:
Remove <style type="text/css">.imcm .imsubc{background-image:url(ie_css_fix);}</style> and try it again.
__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise
Last edited by Burhan; 12-05-2006 at 02:30 AM.
|

12-05-2006, 02:22 AM
|
|
WHT Addict
|
|
Join Date: Nov 2006
Posts: 168
|
|
Just wondering is the problem only with the variable "username"? If yes, have you tried to name it to say "username1" or something else?
|

12-05-2006, 02:25 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Aug 2004
Location: Chicago
Posts: 68
|
|
Code:
foreach($_POST as $key => $value) {
if(!empty($value)) {
$_SESSION[$key] = $value;
}else{
$_SESSION[$key] = "none";
}
}
That's what moves the data into the session variables. I should also mention that I've tried this with IE6, Firefox, and Opera and it doesn't happen.
|

12-05-2006, 02:27 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Aug 2004
Location: Chicago
Posts: 68
|
|
Quote:
|
Originally Posted by zwolf
Just wondering is the problem only with the variable "username"? If yes, have you tried to name it to say "username1" or something else?
|
I haven't, but I would rather find the root cause of this, as I can't believe that MS would be so stupid as to intentionally rewrite that session value somehow. There are thousands of sites that use a session variable named "username".
|

12-05-2006, 02:40 AM
|
|
Community Guide
|
|
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
|
|
Quote:
|
as I can't believe that MS would be so stupid as to intentionally rewrite that session value somehow.
|
You are quite right, as they are not.
__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise
|

12-05-2006, 02:41 AM
|
|
WHT Addict
|
|
Join Date: Nov 2006
Posts: 168
|
|
Are you using IE7 Beta Version 1 by chance? I found a few sites discussing session problems with this version, that seems to have been fixed in more recent updates.
|

12-05-2006, 02:42 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Aug 2004
Location: Chicago
Posts: 68
|
|
Quote:
|
Originally Posted by zwolf
Are you using IE7 Beta Version 1 by chance? I found a few sites discussing session problems with this version, that seems to have been fixed in more recent updates.
|
No, this is straight from windows update.
|

12-05-2006, 03:00 AM
|
|
Community Guide
|
|
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
|
|
Your problem is not IE, its with your script as I am unable to reproduce the error here using IE 7.0.5730.11 (the latest from Windows update as of 04/12/2006).
__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise
|

12-05-2006, 03:06 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Aug 2004
Location: Chicago
Posts: 68
|
|
I have to ask, did you submit the second step? The issue doesn't appear until the 3rd step of the page, so if you didn't go far enough, you wouldn't have seen it.
When it echos the session values upon submission of the first page, it's right, it's only after you submit the second page that it happens.
edit: that's the same version of IE7 I am using.
|

12-05-2006, 03:26 AM
|
|
WHT Addict
|
|
Join Date: Nov 2006
Posts: 168
|
|
It's strange because if it is simply a script error, wouldn't it reflect in IE6 and other browsers?
How about trying to save as another session variable name on the 2nd page , pass that variable to the third page, and then fill "username' on the third page with the other variable. Just a suggestion.
I am curious though if fyrestrtr has the same problem on the third page. I am using IE6.
Last edited by zwolf; 12-05-2006 at 03:30 AM.
|

12-05-2006, 03:41 AM
|
|
Community Guide
|
|
Join Date: Apr 2005
Posts: 1,277
|
|
Warning: Cannot modify header information - headers already sent by (output started at /home/wetrain/public_html/signup.php:29) in /home/wetrain/public_html/signup.php on line 48
__________________
██ Lead Systems Engineer @ PacificHost
██ Incredible. Amazing. Reliable. PacificHost.
██ Visit us at https://www.pacifichost.com/
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|