-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcert.php
95 lines (83 loc) · 2.16 KB
/
cert.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
session_start();
include_once('db_connection_short.php');
// Create a connection
$conn = new mysqli($servername, $db_username, $db_password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<style type='text/css'>
body, html {
margin: 0;
padding: 0;
}
body {
color: black;
display: table;
font-family: Georgia, serif;
font-size: 24px;
text-align: center;
}
.container {
border: 20px solid tan;
width: 750px;
height: 563px;
display: table-cell;
vertical-align: middle;
}
.logo {
color: tan;
}
.marquee {
color: tan;
font-size: 48px;
margin: 20px;
}
.assignment {
margin: 20px;
}
.person {
border-bottom: 2px solid black;
font-size: 32px;
font-style: italic;
margin: 20px auto;
width: 400px;
}
.reason {
margin: 20px;
}
</style>
</head>
<body>
<div class="container">
<div class="logo">
An Organization
</div>
<div class="marquee">
Certificate of Completion
</div>
<div class="assignment">
This certificate is presented to
</div>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["receivers_name"])) {
$receivers_name = $_POST["receivers_name"];
echo '<div class="person">' . $_SESSION['name'] . '</div>';
echo 'Receiver\'s Name : ' .$receivers_name;
}
else {
echo "Invalid request";
}
?>
<div class="reason">
For saving a Life<br/>
!!You are Someones's Hero!!
</div>
</div>
</body>
</html>