-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
67 lines (48 loc) · 2.75 KB
/
contact.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
59
60
61
62
63
64
65
66
67
<?php require "includes/header.php"?>
<link rel="stylesheet" type="text/css" href="assets/styles/contact_styles.css">
<link rel="stylesheet" type="text/css" href="assets/styles/contact_responsive.css">
<link rel="stylesheet" type="text/css" href="assets/styles/my.css">
<div class="home">
<div class="home_background parallax-window page-banner-register" data-parallax="scroll" ></div>
<div class="home_content">
<div class="home_title">contact</div>
</div>
</div>
<!-- Contact -->
<div class="contact_form_section mb-50">
<div class="container">
<div class="row">
<div class="col">
<?php
if($_SERVER["REQUEST_METHOD"]=="POST"){
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$description = $_POST['description'];
$sqlcontact = "INSERT INTO contact (name, email, subject, description)
VALUES (:name, :email, :subject, :description) ";
$stmt = $conn->prepare($sqlcontact);
$stmt->bindParam(':name', $name);
$stmt->bindParam(':email', $email);
$stmt->bindParam(':subject', $subject);
$stmt->bindParam(':description', $description);
$stmt->execute();
echo '<script>alert ("Successfull ") </script>';
}
?>
<!-- Contact Form -->
<div class="contact_form_container">
<div class="contact_title text-center">get in touch</div>
<form method="POST" id="contact_form" class="contact_form text-center">
<input type="text" name="name" id="contact_form_name" class="contact_form_name input_field" placeholder="Name" required="required" data-error="Name is required.">
<input type="text" name="email" id="contact_form_email" class="contact_form_email input_field" placeholder="E-mail" required="required" data-error="Email is required.">
<input type="text" name="subject" id="contact_form_subject" class="contact_form_subject input_field" placeholder="Subject" required="required" data-error="Subject is required.">
<textarea id="contact_form_message" name="description" class="text_field contact_form_message" name="message" rows="4" placeholder="Message" required="required" data-error="Please, write us a message."></textarea>
<button name="submit" type="submit" id="form_submit_button" class="form_submit_button button trans_200">send message<span></span><span></span><span></span></button>
</form>
</div>
</div>
</div>
</div>
</div>
<?php require "includes/footer.php"?>