Fetch user details using session | Sololearn: Learn to code for FREE!


Fetch user details using session

Im trying different login scripts from github, i use sessions to fetch users details but i can only get either or email or username i can never get both using the same codes, it works once then never again. Im on my phone so can't post my code right now but anyone any suggestions using Mysql with Mysqli

11/19/2020 5:52:42 AM

Linda fan

2 Answers

New Answer


You should NOT store username or email in seesion cookie, because the other websites can access it. Instead, you should store a Token in the session cookie. Free PHP Authentication tutorials on YouTube : In 5 minutes by OktaDev https://youtu.be/o7JW5uPDc5w Cookie, session, token by HazardEdit https://youtu.be/sRuRRdJCB8E


Thanks though i can't work with pdo am very new to this