+ 2
Hey anyone tell me the method of storing data in sessions and cookie.
i want to save user id in my project when user login.
3 Respostas
+ 1
u have to start session first session_start ()
then I have to store your user of in session
$_SESSION ['user_id'] = $userId // your user of
+ 1
thank you my friend for your suggestions but i want to know about storing data in sessions and cookies not in database.
- 1
use a database. skip cookies for now. doesnt sound like you need to use them based on your question.