-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcontactview.php
79 lines (70 loc) · 1.8 KB
/
contactview.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
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* @System HP-pc Rax
* @author Rakshit shah <Rakshitshah1994@gmail.com>
* @copyright 2015-2017 |Rakshit shah
* @license http://rakshit.in/license/license.php | PHP License 3.0
* @version 1.1
* @since File available since Release 1.0.0
*/
include("header.php");
include("conection.php");
if(isset($_GET["view"]) && $_GET["view"] == "delete")
// if($_GET["view"] == "delete")
{
mysql_query("DELETE FROM contact WHERE contactid ='$_GET[slid]'");
}
$result = mysql_query("SELECT * FROM contact");
?>
<section id="page">
<header id="pageheader" class="normalheader">
<h2 class="sitedescription">
</h2>
</header>
<section id="contents">
<article class="post">
<header class="postheader">
<h2>Contact Inbox</h2>
</header>
<section class="entry">
<form name="form2" method="post" action="">
<table width="485" border="1">
<tr>
<td width="56"> </td>
<td width="202"><strong>Name</strong></td>
<td width="205"><strong>Subject</strong></td>
</tr>
<?php
$i =1;
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td> ";
?>
<a href='contactview.php?slid=<?php echo $row["contactid"]; ?>
&view=delete'><img src='images/delete.png' width='30' height='30' onclick="return confirm('Are you sure??')"/></a>
<?php
echo $i . " </td>";
echo "<td> " . $row['name'] . "</td>";
echo "<td> <a href='inbox.php?cid=$row[contactid]'>" . $row['subject'] . "</a></td>";
echo "</tr> ";
$i++;
}
?>
<tr>
<td height="25"> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</section>
</article>
</section>
<?php
include("adminmenu.php");
include("footer.php"); ?>
<p> </p>
<form name="form1" method="post" action="">
<input type="submit" name="button" id="button" value="Delete">
</form>