Doh, I should have thought of that!
Thanks, that is what happens when you use code that someone else has writen
and included with a software package. At least I assumed that the code was
already written correctly to accept parameters. I guess it wasn't.
Thank you
Eric H. Lommatsch
360 Business 

From: Ashley Sheridan [] 
Sent: Friday, December 11, 2009 1:39 PM
To: Eric Lommatsch
Subject: Re: [PHP] Issue with $HTTP_POST_VARS Not getting Variables

On Fri, 2009-12-11 at 13:37 -0700, Eric Lommatsch wrote: 

        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
        $username = $HTTP_POST_VARS['username'];
        $password = $HTTP_POST_VARS['password'];
        $username = $_POST['username'];
        $password = $_POST['password'];
        echo $username;
        When I enter the url
        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
        360 Business 

First off, take out those HTTP_POST_VARS lines. That's an outdated way of
accessing post variables, and is made useless by the next two lines that
follow it.

Second, the two lines you are using at the end there are for post data, but
you clearly use get data in the URL! If you have to accept the username and
password from both get and post, change the lines to use $_REQUEST instead of



Reply via email to