RE: $_POST equivalent env variable in apache

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

 



Andre is correct, Apache doesn't actually do anything with web-pages (of any flavour) all it does it << serve >> them. The code in the pages themselves determine what to display on-screen to the end-users.

Just in case it's any use, in PHP you would use:
$_POST for forms sent using POST method, or you could use $_GET for forms sent using GET method.

Andre is also correct in your question not making sense!
It seems like you are asking: "I can use $_POST to get POSTed forms but how do I get the data from POSTed forms?"

Perhaps this snippet will help your PHP code:

switch ($_SERVER['REQUEST_METHOD']) {
case "GET":
	$variable = $_GET['element'];
	break;
case "POST":
	$variable = $_POST['element'];
	break;
}

If you need more PHP help, I suggest you check out www.php.net which is their official portal. Has all the commands and lots of examples too.

Good luck!
Richard


-----Original Message-----
From: André Warnier [mailto:aw@xxxxxxxxxx] 
Sent: 19 May 2009 14:55
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  $_POST equivalent env variable in apache

Evuraan wrote:
> Greetings..!
> 
> Question:much like $_POST in php, used to collect values from a form
> sent with method="POST", is there a variable (like $QUERY_STRING in
> case of a GET) to grab data from a POST request?
> 
> I am trying to avoid having a php snippet to read form data. Like
> $QUERY_STRING in case of a GET, is there a variable for POST DATA.?
> 
Short answer : no.  Apache does not set up an environment value with the 
content of a POST.

But in fact the question does not make much sense.

In the case of a POST, the data may include, for instance, the whole 
content of a 30 MB uploaded file.
There must exist some method in PHP to obtain this data, but that is a 
question best asked on a PHP forum.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



**********************************************************************
Privileged/Confidential Information may be contained in this 
message. If you are not the addressee indicated in this 
message (or responsible for delivery of the message to such 
person), you must not copy, distribute or take any action in 
reliance to it.
In such case, you should destroy this message and kindly 
notify the sender by reply email. Please advise immediately 
if you or your employer do not consent to Internet email for 
messages of this kind. Opinions, conclusions and other 
information in this message that do not relate to the official 
business of Minorplanet Systems plc shall be understood as 
neither given nor endorsed by it. Minorplanet Systems plc, Registration no: 3372097
Minorplanet Limited, Registration no: 4072786
Greenwich House, 223 North Street, Leeds, LS7 2AA
VAT #: 698 1438 86
********************************************************************** 
 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux