Good to all.) You need to remember the user in the cookies. But so that would protect the data. Well, it is natural to pass them through the pages. Question? how to do it?
|
1 answer
Everything that is sent to the client will already be decrypted by all means (not a hacker, so a browser).
Therefore, you can send either what should be decrypted, or something like a session ID - the ID itself costs nothing, and the data is securely stored on the server.
- Ie in kuku bring id sesi? And how to get it? and then how to substitute? - dpi
- @ Dima Perilman pkhp himself take care of this when you start the session - teran
- @ Dima Perilman, read the basics: phpfaq.ru/sessions You start a session, it generates a session, puts the session ID in a cookie, you work with it through
$_SESSION. Repeat request restores the session by the received ID (if it is changed, that's okay, just the old session will die, then puff it will erase it) and voila :) - user207618
|
idshould be stored in your session, and not in cookies. And when editing information related to the author (articles of some kind or posts), you should check that their id also match. - teran