The 20 minute tutorial that made me unlearn everything
I spent 3 weeks building a login system with PHP sessions and kept getting locked out every time I refreshed the page. Then I found a video from 2021 that showed me how cookies and tokens actually work together, and it clicked in one sitting. Has anyone else had a basic concept finally make sense after months of fighting it, or is it just me?
That bit about getting locked out every time you refreshed really hit home for me. I once spent a whole weekend convinced my PHP was broken when it turned out I was setting the cookie after the session started, which is like putting your shoes on before your pants and then wondering why you can't walk right. The scary part is I had built like three other login systems before that and just copied the same wrong pattern every single time out of pure stubbornness. When someone finally explained it with a silly diagram of a bouncer checking your ID stamp at a club, everything just snapped into place. It makes me wonder how many other things I'm doing wrong right now that would take one good video to fix.