Hey guys,
I have php 4.2.3 installed (register_globals "off" as per default installation), and I'm having some very strange issues with php's form behaviour.
If I put in the '+' character as part of a string, and then attempt to echo the variable output after the form has been submitted, the '+' is missing and has been substituted with a white-space character.
Since I'm trying to validate passwords (alphanumeric, upper/lower, etc. - eg. "aB($2+q!" ) this is a rather serious problem. I have had no problems under any previous versions of php and the code is the same as in previous installs.
here's the code:
<?php
if(isset($_POST['submit']))
{
echo "Code: ".$_POST['gmscode']."\n<br>\n" ;
echo "Pwd: ".$_POST['gmspwd']."\n<br>\n" ;
}
?>
<html>
.....
<form name="test" action="<? echo $_SERVER['PHP_SELF'] ; ?>" method="post">
<b>Code: </b><input type="text" name="gmscode" size="20">
<br>
<b>Pwd: </b><input type="password" name="gmspwd" size="30">
<br>
<input type="submit" name="submit" value="Test">
<input type="reset" name="reset" value="Reset">
</form>
...
</html>
Anyone got any idea how to fix this or do a work-around? 😕