might be the settings in php.ini:
; - register_globals = Off [Security, Performance]
; Global variables are no longer registered for input data (POST, GET,
cookies,
; environment and other server variables). Instead of using $foo, you
must use
; you can use $_REQUEST["foo"] (includes any variable that arrives
through the
; request, namely, POST, GET and cookie variables), or use one of the
specific
; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"],
depending
; on where the input originates. Also, you can look at the
; import_request_variables() function.
(pertinent excerpt from the php.ini for php 4.3)
try $_POST["test"] instead of $test
> Its not the browser I have tried on 5 systems at the office. And I have my
> Apache installed here
> and php just default install and it works fine. Same versions at work.
They
> must have done something different
> at the office. Its causing one hell of a headache. I get the normal
results
> when I run the code on my home
> system but at work its a different story. The admin says it must be the
new
> method Apache handles Form
> data or PHP handles form data but I dont think they will ever change the
> standard methods as it would cause
> havoc.
> I want to know where to look for the config that does this. Cant take the
> server down or recompile as it
> would cause a downtime and we have hundreds of sites running on it.
> > Hi,
> > I tried it on my apache/php server and I get the usual result:
> > Page1: (test.php3)
> > <FORM ACTION="testform.php3" METHOD="post">
> > testval: <input type="text" NAME="testval"><BR>
> > <INPUT TYPE="submit">
> > </FORM>
> > < !-- CODE ON THIS PAGE --><BR><BR>
> > <_ FORM ACTION="testform.php" METHOD="post" _><BR>
> > testval: <_input type="text" NAME="testval"_><_BR_><BR>
> > <_INPUT TYPE="submit"_><BR>
> > <_/FORM_><BR><BR>
> > < -- CODE ENDS -- >
> > </BODY>
> > </HTML>
> > Page2: (testform.php3)
> > <?php
> > echo $testval
> > ?>
> > When I input test I just get "test" as response (as it should of
course).
> > There must be something wrong with either your browser or your
compilation
> > of apache/php I guess. If your admin is not supportive. Just compile
> > apache/php (uses ./configure --help to get the options and look on the
php
> > site for instructions) under your own account then start it on a non
> > privileged port. If that works show your admin the results. If it
doesn't
> > give correct results, maybe it is your browser that gives problems?
> > Good luck.
> > Regards, pollux
> > > Hello I am having a strange problem. The servers at my work were
> recently
> > > upgraded to redhat 8.0 and the appache I think is handling form post
> data
> > > differently.
> > > I think its a configuration setting or something but the server
> > > administrator does not
> > > seem to know what the exact problem is.
> > > When posting data from a form it takes it to the php
> > > file and prints out the value followed by the variable name followed
by
> =
> > > and the value again.
> > > example code:
> > > ==========FORM FILE===========
> > > Form Page:
> > > < !-- CODE ON THIS PAGE -->
> > > <FORM ACTION="testform.php" METHOD="post">
> > > testval: <input type="text" NAME="testval">
> > > <INPUT TYPE="submit">
> > > </FORM>
> > > < -- CODE ENDS -- >
> > > ==========TESTFORM.PHP========
> > > testform.php file:
> > > <?php
> > > echo $testval;
> > > ?>
> > > ==============================
> > > When inputing something like the word test
> > > the resulting printed value on the testform.php is:
> > > Input: "test"
> > > Output: "testtestval=test"
> > > expecteed output should simply be: "test"
> > > Here is the same script in operation on the server and you can see
what
> > its
> > > output is: http://www.lara.on.ca/~travis/
> > > This problem is driving me crazy since I have some projects needed to
be
> > > completed but this is holding me
> > > back on severl pages. It has to do with how form data is being handled
> by
> > > the server I believe because it works
> > > when do a URL?testval=test and such but not when from a form.
> > > PLEASE HELP!!
> > > Thank you.