-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
67 lines (58 loc) · 1.83 KB
/
main.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
require_once "pdo.php";
require_once "util.php";
session_start();
if(!isset($_SESSION['account'])){
die("Not logged in");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Home</title>
</head>
<style>
body,html{
background-image:url("https://images7.alphacoders.com/996/thumb-1920-996873.jpg");
height:100%;
background-repeat:no-repeat;
background-attachment:fixed;
background-size:cover;
font-family:serif;
}
</style>
<center>
<body>
<?php
flash();
?>
<a href="logout.php">
<button style="background-color:orange;opacity:0.7;font-size:15px;padding:13px 30px;color:white;border-radius:8px;">Click here to Logout</button>
</a>
<a href="viewown.php">
<button style="background-color:#2855bf;opacity:0.7;font-size:15px;padding:13px 30px;color:white;border-radius:8px;" >Click here to view your details</button>
</a><br><br>
<a href="add.php">
<button style="background-color:#cc6699;opacity:0.7;font-size:15px;padding:13px 30px;color:white;border-radius:8px;">Click here to submit your details</button>
</a>
<a href="edit.php">
<button style="background-color:#cc66ff;opacity:0.7;font-size:15px;padding:13px 30px;color:white;border-radius:8px;">Click here to edit your details</button>
</a><br><br>
<a href="delete.php">
<button style="background-color:#2855bf;opacity:0.7;font-size:15px;padding:13px 30px;color:white;border-radius:8px;" >Click here to delete your details</button>
</a><br><br>
</center>
<h3>Here is the list of all the profiles who have submitted their details. Click on any name to view all the details.</h3>
<?php
$stmt=$pdo->prepare("SELECT name,profile_id FROM profile");
$stmt->execute(array());
$rows=$stmt->fetchall(PDO::FETCH_ASSOC);
echo "<ol>";
foreach($rows as $row){
echo '<li> <a href="viewevery.php?profile_id='.$row['profile_id'].'">'.htmlentities($row['name'])."</a></li>\n";
echo "<br>";
}
echo "</ol>";
?>
</body>
</html>