Discord Server Red Security Twitter Donation to Red Security Red Security Youtube Channel Red Security Tumblr Profile
Login or Register to Hide ads and Accessing all features on the forum

Deleting and Greating Cookie

0 Replies, 4655 Views

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
Rs
* Thankful to Allah *
Kurdy



Users browsing this thread: 1 Guest(s)