Hi: Just learning PHP and couldn't get access to the $_POST variables
from a form. Here are my code sniplets below. For the life of me I
can't figure out why the POST variables aren't being passed. FYI, if I
switch the method to GET and the $_GET variable works great.
Here's the feedback.html:
<html>
<head><title>Fe edback form</title></head>
<body>
<form action="sendmai l.php" method="POST">
Email: <input name="email" type="text">
<input type="submit" value="submit">
</form>
</body>
</html>
Here's the file called sendmail.php:
<?php
echo phpversion();
echo '<p>';
echo '$_POST: <br>';
var_dump($_POST );
echo '<p>$_GET: <br>';
var_dump($_GET) ;
echo '<p>$_REQUEST: <br>';
var_dump($_REQU EST);
?>
And here's the output:
5.0.5
$_POST:
array(0) { }
$_GET:
array(0) { }
$_REQUEST:
array(4) { ["ASPSESSIONIDSC QAAQQR"]=> string(24)
"HGLBCKHDEMEIMP EMCJBODHBH" ["PHPSESSID"]=> string(32)
"66c770da76c0e6 1c51940183f8d64 e25" ["ASPSESSIONIDQA SDARQR"]=>
string(24) "JBOJEPJDPLCFLL IIBJPGAEIH" ["ASPSESSIONIDQA QCBRRQ"]=>
string(24) "ACOLEPJDNBOLJI HOCOGAKJPF" }
I would appreciate any hints and suggestins. Thanks.
from a form. Here are my code sniplets below. For the life of me I
can't figure out why the POST variables aren't being passed. FYI, if I
switch the method to GET and the $_GET variable works great.
Here's the feedback.html:
<html>
<head><title>Fe edback form</title></head>
<body>
<form action="sendmai l.php" method="POST">
Email: <input name="email" type="text">
<input type="submit" value="submit">
</form>
</body>
</html>
Here's the file called sendmail.php:
<?php
echo phpversion();
echo '<p>';
echo '$_POST: <br>';
var_dump($_POST );
echo '<p>$_GET: <br>';
var_dump($_GET) ;
echo '<p>$_REQUEST: <br>';
var_dump($_REQU EST);
?>
And here's the output:
5.0.5
$_POST:
array(0) { }
$_GET:
array(0) { }
$_REQUEST:
array(4) { ["ASPSESSIONIDSC QAAQQR"]=> string(24)
"HGLBCKHDEMEIMP EMCJBODHBH" ["PHPSESSID"]=> string(32)
"66c770da76c0e6 1c51940183f8d64 e25" ["ASPSESSIONIDQA SDARQR"]=>
string(24) "JBOJEPJDPLCFLL IIBJPGAEIH" ["ASPSESSIONIDQA QCBRRQ"]=>
string(24) "ACOLEPJDNBOLJI HOCOGAKJPF" }
I would appreciate any hints and suggestins. Thanks.
Comment