Re: HTTP_POST_VARS truncated
| From: | Jason | Date: | Fri, 30 Nov 2001 08:54:05 +0000 |
| Subject: | Re: HTTP_POST_VARS truncated | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76161@lists.php.net to get a copy of this message | ||
try:
reset($HTTP_POST_VARS);
at the begining of the code. if that doesn't work verify your html again.
make sure the <select>'s are between the form tag. php doesn't ignore
certain form fields. =)
i'm the habit of reading arrays like...
while(list($k,$v) = each($HTTP_POST_VARS)) {
echo "key is $k - val is $v \n";
}
> To test the http/php setup on one of my computers I wrote a
> very simple html form, with two select fields,
> two text fields, and the submit field. Pushing submit the
> data are sent via POST method to an extremely simple PHP
> page which only contains something like:
>
> foreach (var, key) in HTTP_POST_VARS {
>
> print "VAR: $var KEY = $key
> }
>
> It works, (meaning that php code is correct, html output is displayed,
> and no error are reported) but only prints three lines, i.e. the two
select fields are missing.
> Both the php and the html code are syntactically correct: I
> double checked that on the books, just to be sure.
>
> It looks like the select fields, and them only, are not passed
> to the form by the server, or that in some other way they never
> make it into HTTP_POST_VARS.
>
> Any ideas? Setup is plain Red Hat 7.2 with its default apache/php
> packages.
>
> TIA,
> mweb
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>