Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP in Win32

Status
Not open for further replies.

kasuals

Programmer
Apr 28, 2002
100
US
Anyone had any problems with PHP4 in Win32 (Apache 1.3.x) not passing form values via POST?

I can't seem to get it to read form values even with GET.

I'm not a newbie, so I know there are no syntax errors... I've run almost every test I can... could it be a problem with PHP or Apache?

- "Delightfully confusing..." raves The New York Times

-kas
 
Just a heads up:

At least on my linux server, I can access POST data via the variable name passed, i.e.:

<input type=&quot;hidden&quot; name=&quot;whatever&quot; value=&quot;foo&quot;>

echo $whatever;

For some reason within my Win32 installation I can only access POST data via the _POST variable... is there any way around this? Or should I just convert all my code to reflect _POST?

Blah. Windows.

- &quot;Delightfully confusing...&quot; raves The New York Times

-kas
 
This is the &quot;register_globals&quot; problem.

In php.ini, if register_globals is set to &quot;on&quot;, then the value of a form element named &quot;foo&quot; will be available to a PHP script as &quot;$foo&quot;.

However, the default value for register_globals is &quot;off&quot;. The value of a submitted form element named &quot;foo&quot; will be in either $_GET['foo'] or $_POST['foo'], for a GET- or POST-method form, respectively.

I strongly recommend that you leave register_globals set to
&quot;off&quot;, as does the PHP online manual here:
For more information, take a look here, too:
Want the best answers? Ask the best questions: TANSTAAFL!!
 
As a doublecheck for you, you can output the entire arary using:
print_r($_GET[]);
print_r($_POST[]);

this will help you to identify what method and what variables are populated.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top