M
M
Maratka2016-07-13 15:19:00
PHP
Maratka, 2016-07-13 15:19:00

Cookies not being saved?

You need to display a variable that shows how many times the user has seen the banner.
In the banner code we have:
<?php
setcookie("Vas","0",time()+86400,"/","$v");
... // Banner code
$_COOKIE[$v]++;
echo('Views: '.($_COOKIE[$v]));
?>
Why doesn't $_COOKIE[$v] increase with every browser refresh?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2016-07-13
@mopaad

because only setcookie sets/changes cookies.

S
Sergey Andrievsky, 2016-07-13
@Andriyevski

Great guy, get to know DRIVE :D

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question