Php password & lt ;? Session_start (); $ p1 $ _ POST [pin]. & quot; _ & quot; $ p2 $ _ SESSION [pin]; echo $ p1; echo $ p2; echo $ _ POST [pin] $ _ SESSION [pin]; -- returns 1if ($ p1 php password
PHP code
$ _ POST [pin] is aaa, and $ _ SESSION [pin] is bbb.
Returns 1 if echo $ _ POST [pin] =$ _ SESSION [pin,
Please help me see the problem
------ Solution --------------------
I think it is necessary for you to check whether $ _ POST [pin] is aaa $ _ SESSION [pin] and bbb
If yes, echo $ _ POST [pin] === _ SESSION [pin] will not return 1.
If everything is done, wash your hands and come back to create a new file and try again with code. Hahaha
------ Solution --------------------
If it is not a constant array, it is best to add quotation marks. Efficiency is more than N times worse. this is not a good habit.
------ Solution --------------------
View the entire code
If echo $ _ POST [pin] === _ SESSION [pin]; // 1 is returned
Then $ p1 ==$ p2 is not valid! Because $ p1 =$ _ POST [pin]. "_";
Therefore, $ _ SESSION [pin] will not be assigned true.