-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhome.php
More file actions
55 lines (44 loc) · 1.53 KB
/
Copy pathhome.php
File metadata and controls
55 lines (44 loc) · 1.53 KB
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
<?php
session_start();
require_once 'class.user.php';
$user_home = new USER();
if($user_home->is_logged_in()==""){
$user_home->redirect('index.php');
}
$stmt = $user_home->runQuery("SELECT * FROM tbl_mothers WHERE idNumber=:uid");
$stmt->execute(array(":uid"=>$_SESSION['userSession']));
$the_row = $stmt->fetch(PDO::FETCH_ASSOC);
?>
<?php
$cur_page = 'home';
include 'includes/inc-header.php';
include 'includes/inc-mother-nav.php';
?>
<div class="logged-user">
<h2>Logged in as: <?php echo $the_row['firstName'];?> <?php echo $the_row['lastName'];?></h2>
</div>
<div class="large-page">
<div class="form">
<h2>My Certificates</h2>
<br>
<div id="load-products"></div> <!-- products will be load here -->
</div>
</div>
</div>
<script src="assets/js/jquery-1.12.4-jquery.min.js"></script>
<script src="assets/js/sweetalert2.js"></script>
<script>
$(document).ready(function(){
readProducts(); /* it will load products when document loads */
$(document).on('click', '#delete_product', function(e){
var productId = $(this).data('id');
SwalDelete(productId);
e.preventDefault();
});
});
function readProducts(){
$('#load-products').load('read-cert.php');
}
</script>
</body>
</html>