PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 28th, 1999, 06:06 AM
kingsley
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
how can we get the cookie fro php or do we need to use javascript to store the cookie ?


thanks

Reply With Quote
  #2  
Old July 28th, 1999, 09:57 AM
moderator
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
No, you do not need to use Javascript. PHP will both store and read cookies.

You can find information about storing cookies in the PHP documentation.
www.devshed.com/Server_Side/PHP/Manual/manfiles/function.setcookie.html

Also PHP automatically reads all the cookies into variables of the same name.

Reply With Quote
  #3  
Old July 28th, 1999, 09:11 PM
kingsley
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
yeah. how do we kill the cookie or make it expire when the browser points out of the website or after some time of inactivity ? when that happens, the user have to log in again. we don't want another user to go in without typing the username / password just because the valid user went away from his computer.


Reply With Quote
  #4  
Old July 29th, 1999, 07:01 AM
rod k
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
These concerns can be addressed... but I wouldn't use cookies or javascript to address them.

Anything that requires the client to do something that you rely on is asking for trouble.

Reply With Quote
  #5  
Old July 29th, 1999, 09:52 AM
moderator
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
However one way you could accomplish what your asking is to store a timestamp in the cookie.

Once the user returns you can check the timestamp to see if it is within the alloted time....if not, make them log in again.

Another way you could do it is to set the cookie to expire after a certin period of time.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > cookie ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway