Re: Missing Variables
| From: | Bostjan Skufca @ domenca.com | Date: | Thu, 14 Oct 2004 12:33:48 +0000 |
| Subject: | Re: Missing Variables | ||
| References: | 1 2 3 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-14518@lists.php.net to get a copy of this message | ||
because register_globals is on in their php.ini and it is off in yours
Php since 4.3.x or something defaults to setting register_globals = off, which
is very advisable as setting it to on implies several security threats.
regards,
Bostjan
On Thursday 14 of October 2004 14:17, Paolo Morgano wrote:
> Thank you,
> I've been able to do this, can you tell me why the pages I wrote work
> fine on Lycos web space? May be older php versions worked in a different
> way?
>
> Thanks and regards,
>
> Paolo
>
> "Hendrik Schmieder" <hendrik.schmieder@jedox.com> ha scritto nel messaggio
> news:416E6552.4020802@jedox.com...
>
> > Paolo Morgano schrieb:
> > >Hi,
> > > I installed PHP5 like DSO for Apache2. I can see php processed pages,
>
> but
>
> > >I miss variables... I wrote a simple page to test
> > >
> > >index.html:
> > >
> > ><HTML>
> > ><BODY>
> > > <FORM ACTION="script.php" METHOD="POST">
> > > Input text <INPUT TYPE="TEXT" NAME="var"
> > > SIZE="10" MAXSIZE="20">
> > > <INPUT TYPE="SUBMIT" VALUE="Go">
> > > </FORM>
> > ></BODY>
> > ></HTML>
> > >
> > >script.php is:
> > ><HTML>
> > ><BODY>
> > > <?PHP
> > > echo "Insered text is: $var";
> > > phpinfo();
> > > ?>
> > ></BODY>
> > ></HTML>
> > >
> > >The function phpinfo() works fine, but I can't print $var value
>
> (correctly
>
> > >showed PHP VARIABLES section of phpinfo())
> > >What's wrong in my code (copied from several examples in books and net)?
> > >
> > >Thanks,
> > > Paolo
> >
> > You should use
> >
> > echo "Insered text is: " . $_POST["var"] . "<br />\n";
> >
> > instead of
> >
> > echo "Insered text is: $var";
> >
> > Hendrik