Here is my script:
if ($_COOKIE['aktifko'] != 'XXX')
{
$aktifko= 'XXX';
setcookie('aktifko',$aktifko,time() + (3600)); // aktif 1 jam
echo("
<script src=\"myjavascript.js\"></script>
");
}
I wanto run this script only first time access, after visitor open it 2nd time, my js file not active anymore untill 1hr. it's running already but on the first time access show error:
Notice: Undefined index: aktifko in /scriptdirectory/script.php on line 11111
How to run it without error?