|
-
Apr 22nd, 2002, 07:05 PM
#1
Thread Starter
Frenzied Member
PHP Cookies and session variables
I am confused with the cookie and session functions.
I am trying to write and read a persistant cookie. I want that when a user logs in the first time, to save their username to a cookie so that the next time they viist the site, I know who they are.
Also, I need to keep session variables with information just about the current session. I have been reading tutorials but I am still unsure of which functions are for cookies and which are for sessions.
Thanks
-
Apr 23rd, 2002, 12:13 AM
#2
Thread Starter
Frenzied Member
Ok, I think I have it now. Please tell me if I am wrong.
setcookie() is used for both sessions and persistent cookies. If you give it a date, it will persist. But, if you don't give it a date it will die when the browser closes????
-
Apr 23rd, 2002, 01:37 AM
#3
Fanatic Member
ummmmm, i think thats correct. if you dont specify a date for a cookie then it will dissapear when the sessions ends
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|