Jump to content

set cookie


dreamwest

Recommended Posts

i think im closer to what i need, but i still have no idea how to get a cookie within and if/else code:

 

 if (cookie_name == yes) { $customize = 'user dosent have cookie named "yes" ';
}
else { $customize = 'if user has "yes" cookie they will see this message';
}

Link to comment
https://forums.phpfreaks.com/topic/132796-set-cookie/#findComment-690609
Share on other sites

Out of curiosity, are these pages using PHP?  Cause it would be so much easier, and easier for me to answer.  Example:

 

<html>
<body>

<?php
if (isset($_COOKIE["yes"]))
  echo "Cookie exists! <br />";
else
  echo "Cookie does not exist...<br />";
?>

</body>
</html>

 

yes all are in php

Link to comment
https://forums.phpfreaks.com/topic/132796-set-cookie/#findComment-690668
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.