- Home /
Remember currently logged in player
So I am developing a 2D gamified language learning platform. There will be leaderboards, scores etc. Currently, I am using mySQL to store all player details such as accounts and eventually scores etc. So far, I am using php scripts on my web server to access and manipulate the database (adding users, logging in etc).
I am wondering how would I go about storing player sessions. So in web development, you can use sessions and cookies to store information about a user as they navigate the website. How would I store say the player's username so I can tailor the game to their account and progress (even when they go between scenes)
I thought perhaps playerprefs, but surely I would need to encrypt them so users can't modify the details, would this be secure enough? is there a better way to go about doing this?
Thanks
Answer by FortisVenaliter · Jan 31, 2017 at 08:38 PM
I would continue with the method you're using for data transfer. Have them "register" and make an accounts table in your database. Then, when they log in, assign them a session ID and pass that along with all other requests. Then your server code can cross-reference the ID with the account, and provide the proper data.
Your answer
Follow this Question
Related Questions
Why it doesn't save data on the online database? 0 Answers
Storing Player Sessions 0 Answers
Is it possible to send a table name through a wwwform and use it in a php query? 0 Answers
WebHosting with phpMyAdmin PHP 0 Answers
Multistage Delete with WWW 1 Answer