[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] PHP - register globals wierdness.



----- Original Message -----
From: "Ryan Verner" <xfesty@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Sunday, October 13, 2002 3:05 PM
Subject: [cobalt-users] PHP - register globals wierdness.


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there...
>
> Still having problems with my XTR - there's very wierd things happening
with PHP.
>
> Doesn't matter if I set globals off or on in the php.ini - if I have
something in a script like $_REQUEST['variable'];, which should work with
both globals off and on, it isn't read.
>
> I don't understand why this is the case.
>
> Can anybody enlighten me?
>
> R
>

Dunno if this helps ..
was a recent post on another list.


Bassi


      From:  "Andrew McCombe" <andrew@xxxx>
      Date:  Sat Oct 12, 2002  12:12 pm
      Subject:  Re: php again




      PHP has two modes for passing variables - Register_globals on/off.
With it
      off, you can access a variable by using it's name direct:

      <form method="post">
      <input type=text name=myName>
      </form>

      <?php
      echo $myName;
      ?>

      if Register_globals i on, you need to access them via the $HTTP server
      variables:

      <?php
      echo $HTTP_POST_VARS['myName'];
      or
      echo $_POST['myName'];
      ?>

      You can change this in the php.ini file.

      Andrew