The PHP setrawcookie() function is used to set the cookies.
bool setrawcookie ( string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false ]]]]]] )
|Sr.No||Parameters & Description|
It contains Name of the cookies.
It contains the port number.
It contains the information about cookies values.
It contains expire time information about cookies
It contains the information about cookies path wherein server.
It contains domain information.
<?php setrawcookie('cookie_name', rawurlencode($value), time()+60*60*24*365); ?>
Do feel free to ask your questions where necessary and we will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.
Do follow us on our various social media handles available and also subscribe to our newsletter to get our tutorial posts delivered directly to your emails.
Thanks for reading and bye for now.