-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
104 lines (104 loc) · 3.84 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
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
<?php
$current = 'contact';
include "include/header.php"; ?>
<main>
<video src="video/backgroundAnimated2.mp4" poster="images/poster.jpg" loop muted autoplay>
</video>
<div class="contact-container">
<h1>Contactez-nous facilement !</h1>
<div class="contact-form-container">
<form class="contact-form" action="scripts/php/contactForm.php" method="post">
<div class="contact-form-names">
<div>
<label for="lastName">Nom <span> *</span>
<?php
if (isset($_GET['last']) && $_GET['last']==NULL){
echo "<span>Veuillez rentrer votre nom</span>";
}
?>
</label>
<input
<?php
if (isset($_GET['last']) && $_GET['last']!=NULL) {
echo "value='".$_GET['last']."'";
}
?>
id="lastName" type="text" name="last">
</div>
<div>
<label for="firstName">Prénom <span> *</span>
<?php
if (isset($_GET['first']) && $_GET['first']==NULL){
echo "<span>Veuillez rentrer votre prénom</span>";
}
?>
</label>
<input
<?php
if (isset($_GET['first']) && $_GET['first']!=NULL) {
echo "value='".$_GET['first']."'";
}
?>
id="firstName" type="text" name="first">
</div>
</div>
<label for="email">Adresse E-Mail <span> *</span>
<?php
if (isset($_GET['mail']) && $_GET['mail']==NULL){
echo "<span>Veuillez rentrer votre adresse email</span>";
}
?>
</label>
<input id="email" type="email" name="email" value="
<?php
if (isset($_GET['mail']) && $_GET['mail']!=NULL) {
echo $_GET['mail'];
}
?>
">
<label for="subject">Objet <span> *</span>
<?php
if (isset($_GET['subject']) && $_GET['subject']==NULL){
echo "<span>Veuillez spécifier un objet</span>";
}
?>
</label>
<input
<?php
if (isset($_GET['subject']) && $_GET['subject']!=NULL) {
echo "value='".$_GET['subject']."'";
}
?>
id="subject" type="text" name="subject">
<label for="message">Message <span> *</span>
<?php
if (isset($_GET['message']) && $_GET['message']==NULL){
echo "<span>Veuillez écrire un message</span>";
}
?>
</label>
<textarea id="message" name="message" rows="8" cols="80"><?php
if (isset($_GET['message']) && $_GET['message']!=NULL) {
echo $_GET['message'];
}
?></textarea>
<input class="submit" type="submit" name="submit" value="Envoyer">
<?php
if (isset($_GET['error'])) {
echo "<p class='error'>".$_GET['error']."</p>";
}
elseif (isset($_GET['uploadfailure']) || isset($_GET['mailnotsent'])) {
echo "<p class='error'>Problème dans l'envoi du formulaire. Veuillez réessayer.</p>";
}
else if (isset($_GET['uploadsuccess'])) {
echo "<p>Fichier et formulaire envoyés!</p>";
}
elseif (isset($_GET['mailsent'])){
echo "<p>Formulaire envoyé !</p>";
}
?>
</form>
</div>
</div>
</main>
<?php include "include/footer.php" ?>