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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$_REQUEST works, $_POST doesnt

Status
Not open for further replies.

nickjar2

Programmer
Jun 20, 2001
778
US
Hi

This is really really bugging me as I cannot see why it doesnt work....

I have this:

<form action=" method="POST">
<input type="hidden" name="_ipn_act" value="_ipn_payment">
<input type="hidden" name="iowner" value='1234'>
<input type="hidden" name="ireceiver" value='1234'>
<input type="hidden" name="iamount" value='[cost]'>

etc etc

and this in a php file:

@extract($HTTP_GET_VARS);
@extract($HTTP_POST_VARS);
@extract($HTTP_COOKIE_VARS);
@extract($HTTP_SESSION_VARS);
@extract($HTTP_SERVER_VARS);

$h1 = $_ENV['HTTP_REFERRER'];
$h2 = $_SERVER['REMOTE_ADDR'];
$h2 = substr($h2,0,11);

$payee = $_POST["ireceiver"];
$amount = $_POST["iamount"];

$payee and $amount DO NOT get populated, whereas if I use $_REQUEST they do. All I have done is a copy and paste and a tweak, and the code is no different to the other 3 html/php. I am rearing my hair out here as I cant see what is wrong.

Anyone have an idea?

Cheers

Nick

Nick (Everton Rool OK!)
 
First of all, don't do:

@extract($HTTP_GET_VARS);
@extract($HTTP_POST_VARS);
@extract($HTTP_COOKIE_VARS);
@extract($HTTP_SESSION_VARS);
@extract($HTTP_SERVER_VARS);

all the "long" array names are deprecated, so get out of the habit of using them.


I the values are in $_REQUEST but not $_POST, I would suspect that my "method" attribute of my form is not what I expect. I would[ul][li]verify the 'method' attribute of my form.[/li][li]verify what's being returned by using print_r() on both $_GET and $_POST[/li][/ul]



Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top