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!
About halfway down the page is an explanation of how to delete a cookie.
Can somebody provide a workable example??
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.
did you check the link creola gave? there are lots of examples about setting and deleting.