You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
5.0 KiB
152 lines
5.0 KiB
<?php
|
|
// submit_contact.php
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
|
// Get form data
|
|
$name = $_POST['name'];
|
|
$email = $_POST['email'];
|
|
$message = $_POST['message'];
|
|
|
|
// Sanitize data (basic example, can be enhanced)
|
|
$name = htmlspecialchars($name);
|
|
$email = htmlspecialchars($email);
|
|
$message = htmlspecialchars($message);
|
|
|
|
// Send email or store data as needed
|
|
// Example of sending an email (adjust to your mail server configuration)
|
|
$to = 'support@donateease.com';
|
|
$subject = 'Contact Us Form Submission';
|
|
$body = "Name: $name\nEmail: $email\nMessage: $message";
|
|
$headers = 'From: ' . $email;
|
|
|
|
if (mail($to, $subject, $body, $headers)) {
|
|
echo '<script>alert("Your message has been sent successfully!");</script>';
|
|
} else {
|
|
echo '<script>alert("There was an error sending your message. Please try again later.");</script>';
|
|
}
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Contact Us - DonateEase</title>
|
|
<style>
|
|
main {
|
|
margin: 0;
|
|
font-family: Arial, sans-serif;
|
|
background-color: #f4f4f4;
|
|
display: flex;
|
|
justify-content: center; /* Center horizontally */
|
|
align-items: center; /* Center vertically */
|
|
height: 90vh; /* Full viewport height */
|
|
}
|
|
.main {
|
|
max-width: 800px;
|
|
margin: 14px;
|
|
padding: 16px;
|
|
background-color: #ffffff;
|
|
border-radius: 6px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
h2 {
|
|
text-align: center;
|
|
color: #2d572c; /* Forest green */
|
|
}
|
|
p {
|
|
color: #555;
|
|
text-align: center;
|
|
}
|
|
.form-group {
|
|
margin-bottom: 15px;
|
|
}
|
|
label {
|
|
display: block;
|
|
font-weight: bold;
|
|
color: #2d572c;
|
|
margin-bottom: 5px;
|
|
}
|
|
input, textarea {
|
|
width: 100%;
|
|
padding: 5px;
|
|
border: 1px solid #ccc; border-radius: 4px;
|
|
font-size: 16px;
|
|
}
|
|
textarea {
|
|
height: 150px;
|
|
resize: none;
|
|
}
|
|
button {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 10px;
|
|
background-color: #8bbc8b; /* Fresh green */
|
|
color: #ffffff;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
button:hover {
|
|
background-color: #77c774; /* Vibrant green */
|
|
}
|
|
.contact-info {
|
|
margin-top: 20px;
|
|
text-align: center;
|
|
}
|
|
.contact-info p {
|
|
margin: 5px 0;
|
|
}
|
|
.contact-info a {
|
|
color: #2d572c;
|
|
text-decoration: none;
|
|
font-weight: bold;
|
|
}
|
|
.contact-info a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<?php include('includes/header.php'); ?>
|
|
<main>
|
|
<div class="main">
|
|
<br>
|
|
<br>
|
|
<h2>Contact Us</h2>
|
|
<p>If you have any questions, feel free to reach out to us using the form below.</p>
|
|
<form action="contactus.php" method="POST">
|
|
<div class="form-group">
|
|
<label for="name">Your Name</label>
|
|
<input type="text" id="name" name="name" placeholder="Enter your name" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="email">Your Email</label>
|
|
<input type="email" id="email" name="email" placeholder="Enter your email" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="message">Your Message</label>
|
|
<textarea id="message" name="message" placeholder="Enter your message" required></textarea>
|
|
</div>
|
|
<button type="submit">Send Message</button>
|
|
</form>
|
|
<div class="contact-info">
|
|
<p><strong>Email:</strong> <a href="mailto:support@donateease.com">support@donateease.com</a></p>
|
|
<p><strong>Phone:</strong> +977 9803666391</p>
|
|
<p><strong>Address:</strong> Maitidevi, Kathmandu, Nepal</p>
|
|
</div>
|
|
|
|
</div>
|
|
<!-- Embed Google Maps iframe -->
|
|
<div id="map">
|
|
|
|
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d14129.445442684992!2d85.333259!3d27.706127!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x39eb19a00bd8d7c1%3A0xe01225b704668023!2sLord%20Buddha%20Education%20Foundation-%20LBEF%20CAMPUS%20(The%20First%20IT%20College%20of%20Nepal)!5e0!3m2!1sen!2snp!4v1736672731872!5m2!1sen!2snp"
|
|
width="1100" height="600" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|
|
|