RE: [PHP] variables not behaving as expected
| From: | MET | Date: | Mon, 19 Aug 2002 18:07:04 +0000 |
| Subject: | RE: [PHP] variables not behaving as expected | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113242@lists.php.net to get a copy of this message | ||
Read this.
http://www.php.net/release_4_2_0.php
~ Matthew
-----Original Message-----
From: ROBERT MCPEAK [mailto:RMCPEAK@jhuccp.org]
Sent: Monday, August 19, 2002 1:59 PM
To: php-general@lists.php.net
Subject: [PHP] variables not behaving as expected
We've recently upgraded to PHP version 4.2.2 running on SuSE 7.2 with
the 2.4.4 kernel and I'm seeing variables behave in a way I didn't
expect. With the prior configuration http post variables were freely
available on the receiving page, but now, for some reason, they aren't.
This code:
foreach ($_POST as $key => $post)
{
echo "$key = $post<Br>";
$key = $post;
}
echo "<hr>";
echo "do = $do";
renders this result:
do = addart
display_date = date
art_time = time
art_url = url
art_link = link
src_link = link
src_url = url
------------------------------------------------------------------------
--------
do =
Why is the $do variable null outside of the for loop? Shouldn't it
equal "addart?" Shouldn't it be available anywhere on the page? With
the previous configuration the http post variables were available
anywhere on the page. Is this a php configuration issue?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php