-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcookiees.php
More file actions
38 lines (29 loc) · 792 Bytes
/
cookiees.php
File metadata and controls
38 lines (29 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
if(isset($_GET['accept-cookies'])){}
setcookie('accept-cookies', 'true' , time() + 31556925);
header('Location : ./');
?>
<!DOCTYPE html>
<html>
<head>
<title>A demonstration</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<?php
if(!isset($_COOKIE['accept-cookies'])){
?>
<div class="cookie-banner">
<div class="container">
<p>We use cookies for this website. By using this we will assume you consent to <a href="/cookies">the cookies we set</a></p>
<a href="?accept-cookies" class="button">I accept cookie</a>
</div>
</div>
<?php
}
?>
<p>Hello User WELCOME TO JOOMLA! </p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="cookiejs.js"></script>
</body>
</html>