Re: post variables disappeared?
| From: | Philip Olson | Date: | Thu, 04 Jan 2001 01:06:19 +0000 |
| Subject: | Re: post variables disappeared? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32588@lists.php.net to get a copy of this message | ||
Maybe you don't have register_globals set to on. Read about it :
http://www.php.net/manual/configuration.php
Try this test :
first.php
-------------------------------------------------------------------
<form method="post" action="second.php">
<br><input type="text" name="testme">
<br><input type="submit" name="submit">
</form>
second.php
-------------------------------------------------------------------
<?php
foreach ($HTTP_POST_VARS as $key => $value) {
print "<br> $key => $value \n";
}
print '<br><br>';
phpinfo();
?>
That should (WILL) print something assuming track_vars is enabled.
phpinfo will tell you about register_globals, most likely it is OFF.
Regards,
Philip Olson
http://www.cornado.com/
On Wed, 3 Jan 2001, Niles wrote:
> I apologize for the typo in my original request. Here's a "real" file I have on
> my server named "puttestphp.php":
> <?
> echo "
> <form method=post action=phpinfo.php>
> <input name=testme>
> <input type=submit>
> </form>
> ";
> ?>
>
> The file phpinfo.php is this:
> <?
> print("\$testme - $testme<br>\n");
> phpinfo();
> ?>
>
> Running puttestphp.php and entering any value results in the top line saying this:
> $testme -
> [the normal output phpinfo() follows]
>
> My scripts were working correctly for quite some time which is one of the reasons I'm so
> stymied!
>
> Thanks again!
>
> Niles
>
>
> ----- Original Message -----
> From: Julie Meloni
> To: Niles
> Cc: php-general@lists.php.net
> Sent: Wednesday, January 03, 2001 7:23 PM
> Subject: Re: [PHP] post variables disappeared?
>
>
>
> > For instance, if I have a form:
> > <form method=POST action=somephpfile.php>
> > <input name=thisvar type=hidden>
> > <input type submit>
> > </form>
> >
> > with somephpfile.php:
> > <?
> > print("\$thisvar - $thisvar<br>\n");
> > ?>
> >
> > the only output will be:
> > $thisvar -
> >
> > Does anyone have a clue what may have happened?
>
> It has no value -- look at your input field.
>
>
> --
> +------------------------------------------------+
> | Julie Meloni (julie@i2ii.com) |
> | Tech. Director, i2i Interactive (www.i2ii.com) |
> | |
> | "PHP Essentials" & "PHP Fast & Easy" |
> | http://www.thickbook.com/ |
> +------------------------------------------------+
>