When displaying and using cookies it is important to validate them especially when they are integral to the functionality of the page.  Make sure to check to see if the cookie is set before displaying it.

<?php
$var1 = 0;
if (isset($_COOKIE['$test'])) {
    $var1 = $_COOKIE['$test'];
}
echo $var1;
?>
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments