In The Name OF Allah
Al-Salam Alekum
Helllo guys this is a little Javascript script which create a cookie if not exits and will delete it if it exits:
PHP Code:
<html>
<script type="text/javascript">
if (document.cookie.indexOf("mybb[lastactive]=") >= 0) {
alert("hello again");
document.cookie = "mybb[lastactive]" + "=" + "" + ";" +" expires=Thu, 18 Dec 2013 12:00:00 UTC";
}else {
document.cookie = "mybb[lastactive]=1520319365;";
alert("this is your first time");
}
</script>
</html>
Wa Salam Alekum
* Thankful to Allah *
Kurdy