-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwork_experience.php
52 lines (46 loc) · 1.53 KB
/
work_experience.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
<?php
include 'db_config.php';
// Handle form submission to add a new work experience entry
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['add'])) {
$job_title = $_POST['job_title'];
$company = $_POST['company'];
$start_date = $_POST['start_date'];
$end_date = $_POST['end_date'];
$sql = "INSERT INTO work_experience (job_title, company, start_date, end_date)
VALUES ('$job_title', '$company', '$start_date', '$end_date')";
if ($conn->query($sql) === TRUE) {
echo "New work experience added successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
// Retrieve all work experience entries
$sql = "SELECT * FROM work_experience";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Work Experience</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>My Work Experience</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>Work Experience</h2>
<ul>
<li><strong>Experience:</strong> I do not have work experience because i am still a student</li>
</section>
</body>
</html>