Re: Issue with $HTTP_POST_VARS Not getting Variables
| From: | Roberto Aloi | Date: | Fri, 11 Dec 2009 20:54:20 +0000 |
| Subject: | Re: Issue with $HTTP_POST_VARS Not getting Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-300402@lists.php.net to get a copy of this message | ||
Because you're passing the args through the Url (GET), not through a POST request.
Roberto Aloi
On 11 Dec 2009, at 20:37, "Eric Lommatsch" <EricL@micronix.com> wrote:
Hello, I am working with a login page to use with an application that we are planning to make available as a web service. The login.php page itself works correctly, however when I try and pass parameters to the login page the are not being recognized by the login.php page. Here is the basic code that I am dealing with to attempt to the the variables: <?php $username = $HTTP_POST_VARS['username']; $password = $HTTP_POST_VARS['password']; $username = $_POST['username']; $password = $_POST['password']; echo $username; ?> When I enter the url http://localost/index.php?username=jasperadmin&password=****** Where localhost is the ip address of my server and ****** is the password of the user that is logging in, I am not having the username questioned and the login.php isacting as if I have not entered any parameters. Why are the parameters not being accepted? I am using php version 5.2.6 on a ubuntu linux box Thank you Eric H. Lommatsch Programmer 360 Business