Need help with cookies. I cant get the cookies to display. Here are my hard code
ID: 3552562 • Letter: N
Question
Need help with cookies. I cant get the cookies to display.
Here are my hard coded cookies in my html file.
<script type="text/javascript">
document.cookie = "0=Wheat Belly,0.99,3,images/Products/WheatBelly.jpg";
document.cookie = "1=ExerciseCure,1.99,4,images/Products/NoExercise.jpg";
</script>
here is my php code
<?php
$myFile ="order.txt";
$file = fopen("$myFile",'a');
print("<h1>Cookies</h1>");
for ($i = 0; $i < count($_COOKIE); $i++)
{
$ind = key($_COOKIE);
$data = $_COOKIE[$ind];
print("<p>Index: $ind, Data: $data </p>");
next($_COOKIE);
}
fclose($file);
?>
Explanation / Answer
No answer text found in this record.