-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLogout.php
42 lines (41 loc) · 810 Bytes
/
Logout.php
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
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<title>LOGOUT</title>
<style type="text/css">
button{
width: 100px;
height:50px;
background-color: black;
color: white;
border:2px solid red;
/*visibility:hidden; */
}
</style>
</head>
<body>
<center> Do You Want to logout<br><br><br>
<button id="btn"> <a href="index.php"> YES </button></a>
</center>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
<?php $flag='false';?>
$('#btn').click(function(){ // alert('hello');
$.ajax({
url:'index1.php',
type:'POSTs',
success:function(data){
<?php $flag='true';?>
$('#btn').css('visibility','hidden');
}
});
})
</script>
</html>
<?php
if($flag==true)
{
include('index.php');
}
?>