-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheducation.php
58 lines (52 loc) · 1.71 KB
/
education.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
<?php
include 'db_config.php';
// Handle form submission to add a new education entry
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['add'])) {
$degree = $_POST['degree'];
$institution = $_POST['institution'];
$start_date = $_POST['start_date'];
$end_date = $_POST['end_date'];
$sql = "INSERT INTO education (degree, institution, start_date, end_date)
VALUES ('$degree', '$institution', '$start_date', '$end_date')";
if ($conn->query($sql) === TRUE) {
echo "New education added successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
// Retrieve all education entries
$sql = "SELECT * FROM education";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Education</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>My Education</h1>
<nav>
<a href="index.php">Home</a> |
<a href="education.php">Education</a> |
<a href="work_experience.php">Work Experience</a> |
<a href="skills.php">Skills</a> |
<a href="projects.php">Projects</a> |
<a href="contact.php">Contact</a>
</nav>
</header>
<section>
<h2>Current Education</h2>
<ul>
<li><strong>Degree:</strong>BSc.Mathemetical Science</li>
<li><strong>Institution:</strong>University of Limpopo</li>
<li><strong>Year:</strong>first year</li>
<h2>My Education History</h2>
<ul>
<li><strong>Education history:</strong> Matric </li>
</ul>
</section>
</body>
</html>