I am using PHP 4.3.0 on Windows 2000 with IIS 5 and MySQL. It has always worked correctly until now. Suddenly, values entered in HTML forms have started disappearing. Sample code:
the page form.htm:
------------------------------------------------------------------------------
<html>
<head><title></title></head>
<body>
Here's a little form<br>
<form name="form1" method="POST" action="form_do.php">
<input type="text" name="text1">
<input type="submit" name="submit" value="submit form">
</form>
</body>
</html>
the php page "form_do.php"
------------------------------------------------------------------------
<html>
<head><title></title></head>
<body>
<?php
print("Let's process the form<br>");
print("The form variable \$text1 is $text1<br><br>");
$text1="Blah blah blah";
print("Now, \$text1 is $text1");
?>
</body>
</html>
the output in Internet Explorer:
---------------------------------------------------------------------
Let's process the form
Notice: Undefined variable: text1 in c:\inetpub\wwwroot\form_do.php on line 6
The form variable $text1 is
Now, $text1 is Blah blah blah
Naturally, I entered some text in the edit box before submitting.
I have scoured the Internet for days trying to fix this. I have checked and rechecked file permissions, php.ini, IIS configuration etc. PHP is obviously working (for example the recommended test
<?php phpinfo(); ?> works fine. Where are the variables disappearing to?
Thanks,
Andrew