Tyler7028 Posted September 16, 2013 Share Posted September 16, 2013 //declaring variables $answerOne = $_POST['answer1']; $answerTwo = $_POST['answer2']; $answerThree = $_POST['answer3']; $answerFour = $_POST['answer4']; $answerFive = $_POST['answer5']; $answerSix = $_POST['answer6']; //declaring my cookies $exp = time()+86400; setcookie("answer1text", $answerOne, $exp); setcookie("answer2text", $answerTwo, $exp); setcookie("answer3text", $answerThree, $exp); setcookie("answer4text", $answerFour, $exp); setcookie("answer5text", $answerFive, $exp); setcookie("answer6text", $answerSix, $exp); I have 6 different questions coming from a text document. I am trying to display the cookies, but they keep disappearing once I move through the different forums. Does anyone know why they keep disappearing I am using the developer tools and they are going through but only stay on one page. <tr> <td><?php echo $contents[0]; ?></td><td>The sub-marine</td><td><?php echo $answerOne; ?> </tr> they look like such. 6 of these. I will upload the files as well. questions.txt trivia.php Link to comment https://forums.phpfreaks.com/topic/282191-cookie-disappearing-after-moving-to-another-form/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.