SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: set/delete cookie
-
Dec 11, 2000, 00:24 #1
- Join Date
- Jul 2000
- Posts
- 69
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hi Everyone.
I'm writing a login script using PHP. It checks for username & password from a database. How do i set a cookie that has the username & password for an infinite amount of time so that user doesnt have to retype it each time?
Also, how to delete it.
I did a search in this forum and found Karl's example of infinite amount of time but couldn't figure out a way to delete it.
Any help would be greatly appreciated!
Sang N.
-
Dec 11, 2000, 00:48 #2
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sang...
http://www.php.net/manual/function.setcookie.php
About halfway down the page is an explanation of how to delete a cookie.Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
Dec 11, 2000, 01:22 #3
- Join Date
- Jul 2000
- Posts
- 69
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can somebody provide a workable example??
Thanks
-
Dec 11, 2000, 04:58 #4
- Join Date
- Jul 1999
- Location
- Derbyshire, UK
- Posts
- 4,411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
To delete a cookie you just need to set the time to something in the past. I usually set them to time()-10 for the time and it does the job.
Karl Austin :: Profile :: KDA Web Services Ltd.
Business Web Hosting :: Managed Dedicated Hosting
Call 0800 542 9764 today and ask how we can help your business grow.
-
Dec 11, 2000, 05:04 #5
- Join Date
- Oct 2000
- Posts
- 89
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
vinasite
did you check the link creola gave? there are lots of examples about setting and deleting.Great Dane
Gokhan ARLI
Bookmarks