Home >> PHP >> Access Cookie in PHP

Access Cookie in PHP

Cookie is a small file that stored on the client computer. A cookie is used to identify a user.

Syntax

setcookie(name, value, expire, path, domain, secure, httponly);

Set Cookie

setcookie('user','ram',time()+60*60*24);

Access Cookie

echo $_COOKIE['user'];

Post Your Comment

Next Questions
Remove Cookie
how to remove \r\n from string
how to remove new lines from string
how to remove nbsp from string
How to remove all whitespace from a string
How to convert array to string separated by comma
How to list last 12 months from current month
Get the last 12 months from current month
How to list last 6 months from current month
Get the last 6 months from current month
How to list last 12 months from current month by loop
Get the last 12 months from current month by loop
How to list last 6 months from current month by loop
Get the last 6 months from current month by loop
Differentiate between variables and constants
How to increase maximum execution time
How to Increase File Upload Size
Set maximum execution time
Set maximum execution time unlimited
What are the rules for naming a variable
How can you compare objects
Some of the popular frameworks
How to concatenate two strings
How to encrypt password

Copyright ©2022 coderraj.com. All Rights Reserved.