how to add swal or SweetAlert in codeigniter a tag | SweetAlert in php codeigniter | web development – datainflow
Cookies in PHP
A cookie is a small file that stored in user browser to identify the user. Each time the same computer requests a page with a browser, it will send that cookie too.
Creating cookie
We can use PHP setcookie() function to set cookie values.
syntax for setting cookie.
setcookie(name, value, expire, path, domain, secure, httponly);
setcookie takes various parameters such as name, values, expire time, and lot more.
Getting cookies
In order to get cookie values, we use global variable $_COOKIE.
"; echo "Value is: " . $_COOKIE[$cookie_name]; } ?>Related posts