Top 3 Products & Services
1. 2. 3. |
Dated: Sep. 25, 2005
Related Categories
PHP ProgrammingBy Najmi
Cookies are small bits of information that can be stored on a client computer. Once a cookie is created, it will expire after a specified time period. All the information stored in a cookie exists until it expires or deleted by the user.
Now-a-days most of the websites use cookies to store small amounts of information. Websites can read the values from the cookies and use the information as desired. The browser is capable of keeping track of the websites and their corresponding cookies and is capable of reading the information from relevant cookies.
How To Create a Cookie
Cookies can be set using the 'setcookie' function in PHP. This function takes three arguments - name of the variable, value of the variable and the expiry time period. The syntax to set a cookie using PHP is as given below:
|
|
How To Reset/Destroy a Cookie
There are several ways to destroy cookies. Cookies can be deleted either by the client or by the server. Clients can easily delete the cookies by locating the Cookies folder on their system and deleting them. The Server can delete the cookies in two ways:
- Reset a cookie by specifying expiry time
- Reset a cookie by specifying its name only
Now that you've gotten free know-how on this topic, try to grow your skills even faster with online video training. Then finally, put these skills to the test and make a name for yourself by offering these skills to others by becoming a freelancer. There are literally 2000+ new projects that are posted every single freakin' day, no lie!
![]() Previous Article | ![]() Next Article |
![]() |