Re: Newbie Question HTTP_POST_VARS
| From: | (Richard Lynch) | Date: | Thu, 06 Jul 2000 00:03:04 +0000 |
| Subject: | Re: Newbie Question HTTP_POST_VARS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5107@lists.php.net to get a copy of this message | ||
In article <3962101A.37861DAC@bellatlantic.net>, kris@bellatlantic.net
(kris) wrote:
> Hello,
> I just got on the mailing list and found the recent message about
> HTTP_POST_VARS, which is good because I'm struggling with this now.
> I checked the servers's configuration (where I do development - not
> my server) and saw that the track_vars option was set. So I am
> perplexed as to why when I do a gettype() on $HTTP_POST_VARS it returns
> "string" and has nothing in it. I read the note:
$HTTP_POST_VARS will only be set on a page that is actually receiving POST
variables, I.E. one that is being called from a FORM page...
<HTML>
<HEAD><TITLE>POST Vars</TITLE></HEAD>
<BODY>
<FORM ACTION=samepage.php METHOD=POST>
<INPUT TYPE=SUBMIT>
</FORM>
<?php
if (isset($HTTP_POST_VARS)){
while (list($k, $v) = each($HTTP_POST_VARS)){
echo "\$HTTP_POST_VARS[$k] ==> $v<BR>\n";
}
}
else{
echo "POST variables not set yet. Click submit.<BR>\n";
}
?>
</BODY>
</HTML>
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)