Repository navigation
Expand file tree
/
Copy pathstore_application.php
More file actions
155 lines (151 loc) · 5.06 KB
/
Copy pathstore_application.php
File metadata and controls
155 lines (151 loc) · 5.06 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
session_start();
include 'db_connect.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$name = $_POST['name'] ?? '';
$email = $_POST['email'] ?? '';
$phone = $_POST['phone'] ?? '';
$skills = $_POST['skills'] ?? '';
$schedule = $_POST['schedule'] ?? '';
$location = $_POST['location'] ?? '';
$motivation = $_POST['motivation'] ?? '';
try {
$stmt = $pdo->prepare("INSERT INTO volunteer_applications (name, email, phone, skills, schedule, location, motivation) VALUES (?, ?, ?, ?, ?, ?, ?)");
$stmt->execute([$name, $email, $phone, $skills, $schedule, $location, $motivation]);
$success = "Application stored successfully!";
} catch (PDOException $e) {
$error = "Error storing application: " . $e->getMessage();
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Store Volunteer Application - Space ECE</title>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@800&display=swap" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background: #FFF6E7;
overflow-x: hidden;
}
.content {
margin-left: 60px;
padding: 20px;
}
.header {
background: rgba(255, 170, 0, 0.9);
color: #000000;
padding: 10px 20px;
text-align: center;
border-radius: 5px;
margin-bottom: 20px;
}
.header h1 {
font-family: 'Montserrat', sans-serif;
font-size: 36px;
font-weight: 800;
}
.form-box {
background: rgba(255, 170, 0, 0.9);
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
max-width: 600px;
margin: 0 auto;
}
.form-box h2 {
color: #000000;
margin: 0 0 20px 0;
font-size: 24px;
font-family: 'Montserrat', sans-serif;
font-weight: 800;
text-align: center;
}
.form-box form {
display: flex;
flex-direction: column;
}
.form-box label {
margin-bottom: 5px;
color: #000000;
font-size: 14px;
}
.form-box input, .form-box textarea {
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 5px;
background: #ecf0f1;
}
.form-box button {
padding: 10px;
background: #27ae60;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.form-box button:hover {
background: #219653;
}
.message {
text-align: center;
margin-bottom: 15px;
}
.message.success {
color: green;
}
.message.error {
color: red;
}
footer {
background: rgba(255, 170, 0, 0.9);
color: #000000;
text-align: center;
padding: 10px;
position: fixed;
width: 100%;
bottom: 0;
left: 0;
}
</style>
</head>
<body>
<div class="content">
<div class="header">
<h1>Store Volunteer Application</h1>
<p>Manually enter volunteer application data</p>
</div>
<div class="form-box">
<h2>Volunteer Application Form</h2>
<?php if (isset($success)) echo "<div class='message success'>$success</div>"; ?>
<?php if (isset($error)) echo "<div class='message error'>$error</div>"; ?>
<form method="post" action="">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="phone">Phone:</label>
<input type="text" id="phone" name="phone">
<label for="skills">Skills:</label>
<input type="text" id="skills" name="skills" required>
<label for="schedule">Schedule Availability:</label>
<input type="text" id="schedule" name="schedule">
<label for="location">Location:</label>
<input type="text" id="location" name="location">
<label for="motivation">Motivation:</label>
<textarea id="motivation" name="motivation" rows="5"></textarea>
<button type="submit">Store Application</button>
</form>
</div>
</div>
<footer>
© 2025 Space ECE. All rights reserved.
</footer>
</body>
</html>