I have a problem when i take the exam.
Do any one know why ???
With the php buffer setting turned off, why didn’t a cookie get set?
<html>
<head>
<title>Question</title>
<?php
$value = 'something from somewhere';
setcookie("QuestionCookie", $value);
?>
</head>
<body>
</body>
</html>
You must call
setcookie()before any other output. By producing HTML before callingsetcookie(), you eliminate the browser’s ability to receive any additional HTTP headers beyond the HTML document headers (a cookie is a header).