On Sat, Mar 24, 2001 at 05:05:59PM -0500, Matt Adams wrote:
I recently wrote a (yet another) mailing portal which takes a certain
action based on the contents of a hidden form field (i.e. if state==deliver
then deliver mail to the recipient). Although I am certain the code
could be better etc. etc. it works fine. I tested it on a Linux box
running Apache-1.3.17 and PHP-4.0.4pl1 (as a module). However, when I
transferred the project to another Linux server running Apache-1.3.12 and
PHP-4.0.0 (also running as a module), the mailing portal refused to
function properly. I discovered that the code that controls what action
is taken was not picking up on the form contents passed to it.
For a brief example, I have a file named "compose.php" which contains a
form that passes a hidden field called "state" with the value "compose" to
a file called "control.php" using the POST method. "control.php" is
supposed to pick up on the "state" and sends the content of the
"compose.php" form to the deliver stage. Unfortunately, it appears that
"control.php" is not seeing any of the form data from "compose.php".
My question is this: is there a setting in PHP (set either at compile or
in the php.ini) that controls whether or not a PHP script will accept data
passed to it via POST or GET?
I'm not sure but I think register_globals or something like that could
be the problem. I'm pretty sure that with this set, you don't have to
use the $HTTP_GET_VARS or $HTT_POST_VARS arrays. Without it set, you
are forced to use these arrays.
register_globals = on:
$HTTP_GET_VARS['testme']; // will have form info
$testme // will have form info
register_globals = off:
$HTTP_GET_VARS['testme'] // will have form info
$testme // will be empty
I could be completely wrong, but I think this is how that works.
--
Jason Stechschulte
[EMAIL PROTECTED]
--
The prayer of serenity applies here. To both of us. :-)
-- Larry Wall in [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]