Re: $_POST["mypassword"]; ***Undefined index: mypassword

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

 



Okay, now with the isset and var_dump in place within the login.php script, 
I get the output of what I typed into the Log On page.
All this output is 'premeal' for the login.php script.

So then the PHP "Notice's" are just something to know the PHP parser is 
seeing a empty, undescriptive container and is throwing a "hey, look at this
it may not be normal" when the login.php script is run by itself in the
browser.  You are thinking its not a problem and will not lead to any
problems.  If this is the case then thankyou Dimiter.
Blessings,
Chetanji


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
array(3) { ["myusername"]=>  string(2) "my" ["mypassword"]=>  string(4)
"amma" ["Submit"]=>  string(5) "Login" }
array(3) { ["myusername"]=>  string(2) "my" ["mypassword"]=>  string(4)
"amma" ["Submit"]=>  string(5) "Login" }
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




Dimiter Ivanov wrote:
> 
> Well then the $_POST array is empty that's why you have those notices.
> The $_POST array is populated with values ONLY after the form was
> submitted to the login.php script.
> If you use this script before the form was submitted or in any other
> context, then you will get those notices.
> 
> If you check if the variables you are looking for are set, before
> assigning them, you will not get the notices.
> 
> Try this:
> if(isset($_POST["myusername"]) AND isset($_POST["mypassword"])){
>  $myusername=$_POST["myusername"];
>  $mypassword=$_POST["mypassword"];
> }
> 
> On 5/14/07, Chetanji <chetan_graham@xxxxxxxxxxxxxx> wrote:
>>
>> Thanks for the reply,  this is the only output before and after the
>> $_POST....
>>
>>               array(0) { } ......that's it
>>
>> I still have the two Notice's from PHP.
>> But the program works otherwise, in checking the DB for the hashed
>> password...
>> that matches the typed in username ...
>> that is then hashed itself
>> in the login.php program.
>> It works and doesn't 'auth' for incorrect user/pass combinations.
>> However, I do not like running programs that kick out 'errors' of any
>> kind.
>> It seems to always lead to unpredictable situations that are a problem.
>> Any other ideas?
>> Thanks,
>> Chetanji
> 
> Well then the $_POST array is empty that's why you have those notices.
> The $_POST array is populated with values ONLY after the form was
> submitted to the login.php script.
> If you use this script before the form was submitted or in any other
> context, then you will get those notices.
> 
> If you check if the variables you are looking for are set, before
> assigning them, you will not get the notices.
> 
> Try this:
> if(isset($_POST["myusername"]) AND isset($_POST["mypassword"])){
>  $myusername=$_POST["myusername"];
>  $mypassword=$_POST["mypassword"];
> }
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/PHP-to-md5-the-%24var-before-it-reaches-MySQL%27s-gen-query-log-tf3731340.html#a10607559
Sent from the Php - Database mailing list archive at Nabble.com.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux