Site icon Tutorial

setrawcookie in PHP

setrawcookie in PHP

setrawcookie() is a function in PHP that is used to set a cookie in the user’s browser with the value that has not been URL encoded. The function is similar to the setcookie() function, but it does not encode the value of the cookie.

The function has the same parameters as setcookie():

Here’s an example of setting a raw cookie in PHP:

// Set a raw cookie with the name "username" and value "john+doe"
setrawcookie("username", "john+doe", time() + 3600, "/");

Apply for PHP Certification!

https://www.vskills.in/certification/certified-php-developer

Back to Tutorials

Exit mobile version