For those who's confused like me, $empty_pass = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; I got the value from sha1(''); @Mr. Web Designer, Thank you for making this series. I learnt so many useful things.
hello, if you remeber at all what you did it would be appreciated because im still lost for that part. what do you mean by "got the value from sha1('');". do i just echo sha1("); or should i do something else?
@@teriyakinoodlez6119 Hi noodlez, If I remember correctly, we want to check if the password user entered is empty. Before we do that, we use the sha1() function to encrypt the password. You get $empty_pass from passing an empty string '' into sha1(). Then you compare $empty_pass with the encrypted password. You don't have to do anything different from the video. I just didn't know where that $empty_pass value came from, at the time. Hope it helps. 👍
@@houneavireakpong9098 actually i encountered the problem when checking because it didn't work. it was probably because the password wasn't encrypted first when checking. after messing around a bit i just had to remove that first check and then the update profile section worked fine.
@@houneavireakpong9098 actually after trying to update the password it no longer works. when using sha1 it encrypts the password but when trying to login with the account the password doesnt work. would you know how to fix this? sorry to be a pain.
@@teriyakinoodlez6119 Did the login work before update? Try registering a new account and login to see where the problem came from. It's not hard to fix if you know where the issue is.
Why is this code: is not fetching the name of the admin. rather it is saying : Warning: Undefined array key " name" in C:\xampp\htdocs\ecommerce\dashboard.php on line 43