I’ve created an account verification system where a user clicks a link in their emailbox which will trigger activate.php, a script which will do some stuff backend in a MySQL db and then present the user with their account. Currently, I’m doing this with a header change:
header( www.mydomain.com/useraccount.html);
The problem: I need certain local storage variable to be set, such as sessionStorage.email and sessionStorage.accountID. I can’t be sure that these things are currently set because the user could have closed their browser, clicked activate.php after 20 min. and opened a new session. Therefore I’m wondering how to set HTML 5 local storage variables using PHP. Is this possible? Thanks in advance!
Ending up using URL params:
header(www.mydomain.com/useraccount.html/usertag=blah&email=blah@gmail.com);and capturing them in Javascript upon page load.