Re: Re: Authentication fails - problem line found
| From: | dan | Date: | Fri, 04 Mar 2005 19:23:58 +0000 |
| Subject: | Re: Re: Authentication fails - problem line found | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-210021@lists.php.net to get a copy of this message | ||
phpninja wrote:
I think all php functions are case sensitive and must be all lowercase. try changing "IsSet" to "isset" and give it a run. I im not 100% sure because i always type every function in php lowercase and keep it the same throughout the application so i dont ever have to worry about that. Just a thought. -phpninja -----Original Message----- From: Richard Lynch [mailto:ceo@l-i-e.com] Sent: Friday, March 04, 2005 11:03 AM To: John Swartzentruber Cc: php-general@lists.php.net Subject: Re: [PHP] Re: Authentication fails - problem line found John Swartzentruber wrote:How about using single quotes around all the action phrases: if (IsSet($_POST['action'])) {I stripped down my original script until it started receiving POST data, then I kept modifying it until I figured out where the problem was. I found it, but I'm still as clueless as every. To summarize: I have a form that posts to the same script that contains the form. In its original state, when the script is called after I submit the form data, the $_POST[] data is completely empty and the _SERVER variable that indicates the type of data is set to "GET". In the script is the following code: if (IsSet($_POST["action"])) {WILD GUESS: Somewhere in your form and/or the logic, you are sending GET data for $action as well as POST data for $action, and you are confusing the two. Show us your stripped-down but still-broken code.// $action = $_POST["action"];} else {$action = $_GET["action"];} Normally the second line is not commented. When I comment out that line, then the $_POST array has all of the data I would expect it to. When it is not commented, then it does not work. Just to make sure that I am really confused, this bit of code is *after* the call to var_dump($_POST), but *before* the code that creates the form. Does anyone have any ideas about why setting this variable has such a large and seemingly unrelated affect?
// $action = $_POST['action'];} else {
$action = $_GET['action'];} I'm slowly learning, myself, on the proper placement of quotes. Thanks -dant