Alex Rivera | Logout

How do you set up use HttpOnly cookies in PHP

Asked 2008-08-31T14:27:50.337
109

How can I set the cookies in my PHP apps as HttpOnly cookies?

Edit
Report

1 Answer

8
<?php
//None HttpOnly cookie:
setcookie("abc", "test", NULL, NULL, NULL, NULL, FALSE); 

//HttpOnly cookie:
setcookie("abc", "test", NULL, NULL, NULL, NULL, TRUE); 

?>

Source

answered 2008-08-31T14:36:36.993

Your Answer