$_POST v4.3 to v5.0
| From: | Michael Purdy | Date: | Wed, 14 Jul 2004 13:17:01 +0000 |
| Subject: | $_POST v4.3 to v5.0 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-190469@lists.php.net to get a copy of this message | ||
Folks
I appreciate the answers received previously in relation to my 4,3 to 5.0 question regarding
$_REQUEST $_POST etc..
Unfortunately I am still no further advanced on solving the problem. Clearly the value from the
form is not being passed to the script in 5.x, but being very new to PHP and I am not sure why.
Here are my two scripts which I created for testing purposes and which run fine under 4.3.x
##### SENDING SCRIPT #### 1.php
<script language="php">
echo '<form method="POST" action="2.php">';
echo '<p>Input a Test Variable <input type="text" name="testvar"
size="20"></p>';
echo '<p><input type="submit" value="Submit"
name="Button><input type="reset" value="Reset"
name="B2"></p>';
echo '</form>';
</script>
#### RECEIVING SCRIPT ### 2.php
<script language="php">
$searchtype = $_POST['testvar'];
echo $searchtype;
</script>
I still receive a error
Notice: Undefined index: testvar in e:\WC5\http\cgi\2.php on line 3 PHP Notice: Undefined index:
testvar in e:\WC5\http\cgi\2.php on line 3
Is there anything in the php.ini v5 file that maybe causing me problems.
Mike