Page 1 of 1

Random characters in form processing

Posted: Sun Sep 03, 2006 5:57 pm
by billyt
Any help with the following would be appreciated - it's driving me crazy.

I have a registration form for an application, that opens in the user's default browser and sends info back to the server for validation. But for some people (about 2-5% of users) the form data that I receive contains a whole lot of extra characters, and corrupted strings. The users who experience this don't seem to be using anything weird - generally IE, english language settings.

The form is using method="post" with enctype="multipart/form-data" - see below.

Have been printing out the POST values (this is the first thing that happens in the script):

Code: Select all

$postvals = '"';
	
	foreach ($_POST as $key => $value) {
		$postvals .= "   $key=$value";
	}
	$postvals .= '"';
	writeLog("POST String=$postvals");
What I get looks something like the following (data replaced by XXXX) Sometimes there are longer or shorter sequences of the +AAA- codes and sometimes snippets of other keys/values mixed in to the code:

[2006-09-02 10:58:06] FormRegister:POST String=" realname+AAA-=XXXX+AAA-PÐÄ}8 email+AAA-=XXXX+AEA-XXXX.com+AAA-n ProdCode+AAA-AA-PÐÄ}8=XXXX+AAA- hardwareID+AAA-_com+AAA-n=XXXX+AAA-2 prodVer+AAA-AA-=XXXX+AAA-A-.com+AAA-n versionnumber+AAA-odCode+AAA-AA-PÐÄ}8=XXXX+AAA-AA-AA- Action+AAA-A-A-_com+AAA-n=Submit+AAA-"


The form in the html doc. is pretty standard:

Code: Select all

<form name="form1" method="post" enctype="multipart/form-data" action="http://www.XXXX.com/FormRegister.php">
      <input name="realname" type="text" size="40">
      <input name="email" type="text" size="40">
      <input name="ProdCode" type="text" size="40">
      <input type=hidden name="hardwareID" >
      <input type=hidden name="prodVer" >
    	<input type=hidden name="versionnumber" >
       <input type="submit" value="Submit" name="Action">
        <input type="reset" value="Clear" name="Clear">
</form>
Am running PHP version 5.04

Any suggestions???? Might not even be a PHP problem...

Posted: Sun Sep 03, 2006 5:58 pm
by feyd
lose enctype.

Posted: Sun Sep 03, 2006 11:34 pm
by billyt
Thanks.

is there any explanation for why it does this only witch a few individuals?

Posted: Sun Sep 03, 2006 11:40 pm
by feyd
Probably. I don't know it and have never bothere to look it up, but I would imagine google may be of service given the right keywords.

Posted: Mon Sep 04, 2006 3:59 am
by billyt
Yes, I had hoped to find something on google. Unfortunately, the right search terms have not yet sprung to mind...

Thanks anyway.

Posted: Mon Sep 04, 2006 5:35 pm
by billyt
OK, well I finally did think of the right search terms, and came across this page

http://bugs.php.net/bug.php?id=22612

Seems that the problem is most likely an IE6 / Win2k issue - which explains why only a few people suffer. I'll check on an old Win2k machine and see if I can duplicate it.

Posted: Mon Sep 04, 2006 7:50 pm
by billyt
no, it's not Win2k - latest person with the problem was running XP Sp2 and IE6 with all updates.

Posted: Mon Sep 04, 2006 9:05 pm
by Z3RO21
It is probly IE :roll: