Hello. I'm beginner in php framework . I have a problem. I have 3 page. 1 login.php , 2 user_view.php , 3 admin.php. I want to serialize the session login and password , and i want to controll it in user_vire.php and admin.php . Please help
How can i serialize session in php
Collapse
X
-
OK thanks but i want use serialize function with base64_encode to save the session username and password . How can i controll this value in user_view.php and admin.php . Please help me with an exampleComment
-
I too don't understand what's wrong with just using a $_SESSION? When you say control this value in user_view.php and admin.php, what do you mean? What are you doing with the variables?
Generally how login's work is once a user logs in, for example, the username (or some idetifier) is stored in the $_SESSION. That is then used to collect other account information from a database which has all the rest of the info. Taking a stab in the dark, I am going to guess you don't want to use a database, which will require lots of file reading and writing, and will take up more resources than just using a database in most cases.Comment
Comment