This repository has been archived by the owner on Aug 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
67 lines (60 loc) · 1.97 KB
/
profile.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
<?php
include_once 'header.php';
?>
<?php
if (!isset($_SESSION['login_user'])){
$_SESSION["submit"] = "please log in first";
echo "<script>location.href='index.php';</script>";
}
?>
<div class="row adjust">
<div class="class s12 m6" style="margin-left: 20px;">
<h3>Hello <?php echo $name_sess; ?>!</h3>
<h5>Your submissions:</h5>
</div>
<?php
$sql = "SELECT * FROM subm where name = '$name_sess'";
$result = $con->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo '<div class="col s12 m6">
<div class="card blue-grey lighten-5">
<div class="card-content black-text">
<span class="new badge grey darken-3" data-badge-caption="">'.$row['tag'].'</span>
<span class="card-title">'.$row['heading'].'</span>
<p class="right-align">-'.$row['name'].'</p>
<p class="right-align">'.$row['datel'].'</p>
</div>
<div class="card-action">
<a class="modal-trigger" href="#'.$row['id'].'">read it!</a>
</div>
</div>
</div>
<!-- Modal Structure -->
<div id="'.$row['id'].'" class="modal">
<div class="modal-content">
<h4>'.$row['heading'].'</h4>
<p>'.$row['article'].'</p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-green btn-flat">Close</a>
</div>
</div>
';
}
}
?>
</div>
<!-- Modal deelete -->
<!-- <div id="'.$row['id'].'delete" class="modal" style="width: 400px;">
<div class="modal-content center-align">
<h4>Are you sure to delete this article?</h4>
</div>
<div class="modal-footer">
<a href="?" class="modal-close waves-effect waves-green btn-flat">Yes</a>
<a href="#!" class="modal-close waves-effect waves-green btn-flat">No</a>
</div>
<a class="modal-trigger" href="#'.$row['id'].'delete">Delete it!</a>
</div> -->
</body>
</html>