-
Notifications
You must be signed in to change notification settings - Fork 32
/
deletechat.php
67 lines (51 loc) · 1.08 KB
/
deletechat.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!--
<form action="adchat.php" method="POST">
Name<input type="text" name="username" value="admin" readonly ><br>
message<input type="text" name="msg"><br>
<input type="submit" value="send">
</form>
-->
<style>
.chatmsg
{
background-color: blue;
border: 1px solid blue;
border-radius: 10px;
height:50px;
width:80px;
padding: 8px;
color: white;
}
.adchatmsg
{
background-color: green;
border: 1px solid green;
border-radius: 10px;
height:50px;
width:80px;
padding: 8px;
color: white;
}
</style>
<!--to send message-->
<?php
if($_SERVER['REQUEST_METHOD']=="GET")//con establish
{
$localhost = "localhost";
$usernamew = "root";
$passwordw = "";
$db = "expdb";
$conn = mysqli_connect($localhost,$usernamew,$passwordw,$db);
if(!$conn){
echo "";
}
else
{
echo "";
}
$sql = "delete from chattable ";
$result = mysqli_query($conn,$sql);
// echo "message sent!";
echo "all chats deleted";
}
?>