133 lines
5.9 KiB
PHP
133 lines
5.9 KiB
PHP
<?php
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
if (!empty($_POST["name"]) && !empty($_POST["email"])) {
|
|
|
|
$name = $_POST["name"];
|
|
$email = $_POST["email"];
|
|
$mobile = $_POST["mobile"];
|
|
$message = $_POST["message"];
|
|
try {
|
|
// Create database connection
|
|
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
|
|
// Prepare SQL statement
|
|
$stmt = $conn->prepare("INSERT INTO contact (name, email, mobile, message) VALUES (:name, :email, :mobile, :message)");
|
|
$stmt->bindParam(':name', $name);
|
|
$stmt->bindParam(':email', $email);
|
|
$stmt->bindParam(':mobile', $mobile);
|
|
$stmt->bindParam(':message', $message);
|
|
|
|
// Execute SQL statement
|
|
$stmt->execute();
|
|
$in_page_message= "<p class='text-green' style='text-align: center;'>Thank you, $name! Your Query has been submitted.</p>";
|
|
} catch (PDOException $e) {
|
|
$in_page_message= "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
|
}
|
|
} else {
|
|
$in_page_message= "<p class='text-danger'>Both name and email are required.</p>";
|
|
}
|
|
}
|
|
|
|
?>
|
|
|
|
<?php
|
|
$web_page_title = 'Contact Us - dwd.siliconpin.com';
|
|
$web_page_meta_description = 'Get in touch with DWD SiliconPin any inquiries or support. Our team is ready to assist you with your needs.';
|
|
$web_page_meta_keywords = 'contact us, SiliconPin, hosting services, support, inquiries';
|
|
$web_page_author = 'dwd.siliconpin.com';
|
|
$web_page_meta_og_title = 'Contact Us - dwd.siliconpin.com';
|
|
$web_page_meta_og_description = 'Get in touch with DWD SiliconPin any inquiries or support. Our team is ready to assist you with your needs.';
|
|
$web_page_meta_og_image = '';
|
|
$web_page_meta_og_url = 'https://dwd.siliconpin.com/contact-us';
|
|
$web_page_meta_twitter_title = 'Contact Us - SiliconPin Hosting Services';
|
|
$web_page_meta_twitter_description = 'Get in touch with DWD SiliconPin any inquiries or support. Our team is ready to assist you with your needs.';
|
|
$web_page_meta_twitter_image = 'URL to an image related to your hosting services';
|
|
$web_page_meta_twitter_card = 'summary_large_image';
|
|
|
|
require_once('.htac_header.php');
|
|
require_once('.htac_nav.php');
|
|
?>
|
|
|
|
|
|
<style>
|
|
.custom-container {
|
|
max-width: 800px; /* Set maximum width */
|
|
margin-left: auto; /* Center container horizontally */
|
|
margin-right: auto;
|
|
border-radius: 20px;
|
|
margin-top: 100px;
|
|
margin-bottom: 100px;
|
|
padding: 10px;
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.custom-container {
|
|
width: 100%; /* Reset width to full for large screens */
|
|
}
|
|
}
|
|
|
|
.custom-form {
|
|
justify-content: center;
|
|
padding-left: 1rem;
|
|
padding-right: 1rem;
|
|
padding-bottom: 2rem;
|
|
border: 2px solid #1c1917;
|
|
}
|
|
.input-flex-column{
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 10px 0px 10px 0px;
|
|
}
|
|
</style>
|
|
|
|
|
|
<section class="custom-container contact-us-form" >
|
|
<?php if(isset($in_page_message)) echo '<h2> '.$in_page_message.' </h2>'; ?>
|
|
<div class="p-4 max-w-2xl rounded-xl shadow-md shadow-[#FFFFFF]">
|
|
<p style="text-align: center; font-size: 22px; font-weight: bold; text-transform: uppercase;">Contact Us</p>
|
|
<form method="POST" action="" class="flex flex-col space-y-3">
|
|
<p style="">Feel free to ask...</p>
|
|
<div class="input-flex-column">
|
|
<label class="text-[#FFFFFF]" for="name">Name: </label>
|
|
<input class="diZAllInput" name="name" class="" type="text" placeholder="Name" required>
|
|
</div>
|
|
<div class="input-flex-column">
|
|
<label class="text-[#FFFFFF]" for="mobile">Mobile No.: </label>
|
|
<input class="diZAllInput" name="mobile" class="" type="text" placeholder="Mobile" >
|
|
</div>
|
|
<div class="input-flex-column">
|
|
<label class="text-[#FFFFFF]" for="email">E-mail: </label>
|
|
<input class="diZAllInput" name="email" class="" type="text" placeholder="E-mail" >
|
|
</div>
|
|
<div class="input-flex-column">
|
|
<label class="text-[#FFFFFF]" for="message">Write our Message: </label>
|
|
<textarea class="diZAllInput" name="message" class="" rows="5" cols="50" placeholder="Write your Message....." required style="resize: vertical;"></textarea>
|
|
</div>
|
|
<div class="input-flex-column">
|
|
<button type="submit" class="diZchoosenButton">Submit</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
<!-- <div class="flex justify-center custom-form">
|
|
<div class="custom-shadow p-10 custom-rounded" style="padding: 20px;">
|
|
<form method="POST" action="">
|
|
<div class="input-flex-column">Full Name:
|
|
<input name="name" class="custom-input" type="text" placeholder="Name" required>
|
|
</div>
|
|
<div class="input-flex-column">Mobile No.:
|
|
<input name="mobile" class="custom-input" type="text" placeholder="Mobile No." required>
|
|
</div>
|
|
<div class="input-flex-column">E-mail
|
|
<input name="email" class="custom-input" type="text" placeholder="E-mail" required>
|
|
</div>
|
|
<div class="input-flex-column">Write your Message:
|
|
<textarea name="message" class="custom-textarea pl-4 py-2" rows="5" cols="50" placeholder="Write your Message....." required></textarea>
|
|
</div>
|
|
<div class="flex justify-center pt-4">
|
|
<button type="submit" class="custom-button">Submit</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div> -->
|