-
Notifications
You must be signed in to change notification settings - Fork 0
/
display.php
74 lines (58 loc) · 2.65 KB
/
display.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
<?php include_once('resources/init.php');?>
<?php
//$conn = mysqli_connect("localhost", "root", "", "blog_oop");
$sql = "select * from tbl_contact order by id desc";
$res = mysqli_query($conn, $sql);
?>
<!-- Header
================================================== -->
<?php include_once('header.php');?>
<!-- Content
================================================== -->
<div id="content-wrap">
<div class="row">
<div id="main" class="eight columns">
<article class="entry">
<header class="entry-header">
<h2 class="entry-title">
<h2>Message</h2>
<hr>
</h2>
<!--Table part only read-->
<table border="1" width="600" height="70">
<tr style="text-align: center;border-bottom: 1px solid greenyellow;">
<td>Id</td>
<td>Email</td>
<td>Subject</td>
<td>Message</td>
<td>Time</td>
<td>Action</td>
</tr>
<?php while ($row = mysqli_fetch_assoc($res)) { ?>
<tr style="text-align: center;border-bottom: 1px solid orangered;">
<td><?= $row['id']; ?></td>
<td><?= $row['email']; ?></td>
<td><?= $row['subject']; ?></td>
<td>
<textarea name="" id="" cols="25" rows="10">
<?= $row['message']; ?>
</textarea>
</td>
<td><?= date('d-M-y h:i:s:a', strtotime($row['date_posted'])); ?></td>
<td>
<a href="displayshow.php?id=<?= $row['id'];?> &name= <?= $row['name'];?> &email= <?= $row['email'];?> &subject= <?= $row['subject'];?> &message= <?= $row['message'];?>">Show</a>
</td>
</tr>
<?php } ?>
</table>
</article> <!-- end entry -->
<a class="read" href="admin.php"><i class="fas fa-angle-double-left"> Back Before</i></a>
</div> <!-- end main -->
<!-- start sidebar -->
<?php require_once 'sidebar.php'; ?>
<!-- end sidebar -->
</div> <!-- end row -->
</div> <!-- end content-wrap -->
<!-- Footer
================================================== -->
<?php require_once 'footer.php'; ?>