14 Years
Discussion Span
Last Post by samaru

i want any one tell me

how can i used session and cookies ??? :o :o :o

I've been using sessions for a short time. But here's what I know.

-Sessions and cookies go hand-and-hand. Use session_start(); at the begining of the code and if the users browser accepts cookies then your session variables are basically saved in the cookie. If they dont accept, then the browser is responsible for the variables. Either way the variables are handled by you in the same way

-To make a session variable, just start using one like you do with a regular php variable. Say $_SESSION = value; or use an array like this: $_SESSION = value;

hope this is a good start!


Be aware that some people (those who don't know much about anything and think that cookies will give them a venereal disease) turn them off.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.