ajout vérifications fichier php et fdp étude_contexte

master
Baptiste DUDONNE 3 years ago
parent 74a22a758d
commit ae116825ca

Binary file not shown.

Binary file not shown.

@ -1,111 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../style/style.css">
<link rel="stylesheet" href="../style/inscription.css">
<link rel="stylesheet" href="../style/navbar.css">
<title>Inscription</title>
<link rel="icon" href="../images/boussole.png">
</head>
<body>
<header>
<nav>
<ul class="navbar" id="navbar">
<li><a href="../index.html">Accueil</a></li>
<li><a href="traces.html">Nos Parcours</a></li>
<li><a href="images.html">Galerie</a></li>
<li><a href="tutos.html">Tutoriels</a></li>
<li><a href="https://www.visugpx.com/editgpx/">Tracer !</a></li>
<li><a id="actual" href="#">S'inscrire</a></li>
<a class="close" href="#"><img src="../images/open.png" id="close"></a>
</ul>
<a class="open" href="#navbar"><img src="../images/open.png" id="open"></a>
<a href="../index.html"><img src="../images/boussole.png" id="boussole"></a>
</nav>
<nav class="navbar2">
<a href="../index.html"><img src="../images/boussole.png" alt="Img Not Found :("></a>
<a href="traces.html">Nos Parcours</a>
<a href="images.html">Galerie</a>
<a href="tutos.html">Tutoriels</a>
<a href="https://www.visugpx.com/editgpx/" target="blank_">Tracer!</a>
<a id=actual href="inscription.html">S'inscrire !</a>
</nav>
</header>
<div class="Text_1">
<h1>Inscrivez Vous à Notre NewsLetter !</h1>
</div>
<div class="form">
<form action="../php/index.php" method="post">
<section class="form_left">
<label for="nom">Nom : *<br></label>
<input type="text" id="nom" required><br>
<label for="prenom" title="prenom">prenom : *<br></label>
<input type="text" name="prenom"id="prenom"required><br>
<label for="adress">Adresse : *<br></label>
<input type="text" name="adress" id="adress" required><br>
<label for="phone">Téléphone : *<br></label>
<input type="tel" name="phone" id="phone"required><br>
<label for="email">Courriel : *<br></label>
<input type="email" name="mail" id="email"required name><br>
</section>
<section class="form_right">
<label for="commentaires"></label>
<input id="reset" type="reset">
<input id="submit" type="submit">
</section>
</form>
</div>
<div class="bf_footer">
<h3>#Go Ride Now<br>
#Va Rouler</h3>
</div>
<footer>
<div class="content_4">
<section class="bottom_left">
<a href="../index.html"><img src="../images/boussole.png"></a>
<p>
Run & Bike In Mountain @2022 All Rights Reserved.<br>
See Here Our <a href="#">Terms And Conditions.</a><br>
Dudonné Baptiste BUT 1 2022-2023.<br>
Vous Souhaitez nous Contacter ? C'est <a href="contact.html">ici.</a>
</p>
</section>
<section class="bottom_right">
<p>Follow Us On :</p>
<a href="#">Facebook</a>
<a href="#">Twitter</a>
<a href="#">intragram</a>
</section>
</div>
</footer>
</body>
</html>

@ -60,7 +60,7 @@
if ($prenom ==NULL || $prenom ==""){ if (ctype_space($prenom)){
echo"<h1>Erreur ! Veuillez Remplir Le Champ <b>Prénom<b> Obligatoires</h1></div>"; echo"<h1>Erreur ! Veuillez Remplir Le Champ <b>Prénom<b> Obligatoires</h1></div>";
echo' echo'
@ -117,7 +117,7 @@
';//fin de l'echo ';//fin de l'echo
} }
else if ($mail ==NULL|| $mail ==""){ else if (ctype_space($mail)){
echo"<h1>Erreur ! Veuillez Remplir Le Champ <b>mail<b> Obligatoires</h1></div>"; echo"<h1>Erreur ! Veuillez Remplir Le Champ <b>mail<b> Obligatoires</h1></div>";
echo' echo'
@ -172,7 +172,7 @@
} }
else if ($nom ==NULL || $nom==""){ else if (ctype_space($nom)){
echo"<h1>Erreur ! Veuillez Remplir Le Champ <b>nom<b> Obligatoires</h1></div>"; echo"<h1>Erreur ! Veuillez Remplir Le Champ <b>nom<b> Obligatoires</h1></div>";
echo' echo'
@ -238,7 +238,7 @@
';//fin de l'echo ';//fin de l'echo
} }
else if ($msg==NULL || $msg==""){ else if (ctype_space($msg)){
echo"<h1>Erreur ! Veuillez Remplir Le Champ <b>Message<b> Obligatoires</h1></div>"; echo"<h1>Erreur ! Veuillez Remplir Le Champ <b>Message<b> Obligatoires</h1></div>";
@ -292,8 +292,67 @@
</form> </form>
</div>';//fin de l'echo </div>';//fin de l'echo
} }
else{ else if(var_dump(filter_var($POST['mail']), FILTER_VALIDATE_EMAIL)){
echo"<h1>Erreur ! Veuillez Remplir Une Adresse Mail Valable ! Obligatoires</h1></div>";
echo'
<div class="form_contact">
<form action="../php/contact.php" method="post">
<label for="name">Nom* :</label>
<input type="text" name="name" id="name" required><br>
<label for="prenom">Prénom* : </label>
<input type="text" name="prenom" id="prenom" required><br>
<label for="tel">Téléphone :</label>
<input type="tel" name="tel" id="tel"><br>
<label for="mail">Adresse Mail* :</label>
<input type="email" name="mail" id="mail"><br>
<label for="reason">Raison Du Contact : </label>
<select name="reason" size="1">
<option>Besoin D\'aide
<option>Devenir Certifié
<option>Autre
</select><br>
<label for="horaire">Jour et Horaire :</label>
<input name="horaire" id="horaire" type="datetime-local"><br>
<div>
<legend>S\'agit t\'il de votre premier contact avec nous ?</legend>
<div>
<input type="radio" id="OuiFirst" name="OuiFirst" value="OuiFirst">
<label for="OuiFirst">Oui</label>
</div>
</div>
<br>
<label for="msg">Message* :</label><br>
<textarea id="msg" name="msg" placeholder="Ecrivez La Raison de Votre Contact." rows="5" cols="33" required>
</textarea><br>
<input type="reset" value="Effacer"/>
<input type="submit" value="Envoyer"/>
<p>Les Champs Contenant des étoiles* sont obligatoires !</p>
</form>
</div>';//fin de l'echo
}
else {
echo('</div><h2 id="rep">Réponse Bien Transmise !<br>Nous Vous Recontacterons par mail !</h2>'); echo('</div><h2 id="rep">Réponse Bien Transmise !<br>Nous Vous Recontacterons par mail !</h2>');
echo("<div class=\"reponse\"><h3>Récapitulatif :</h3>"); echo("<div class=\"reponse\"><h3>Récapitulatif :</h3>");
@ -304,9 +363,9 @@
echo 'Raison : ',$raison; echo 'Raison : ',$raison;
} }
echo'<p>Adresse : ',$mail,'<br>Votre Message : ',$msg,"</p></div>"; echo'<p>Adresse : ',$mail,'<br>Votre Message : ',$msg,"</p></div>";}
}//fin else
?> ?>
<div class="bf_footer"> <div class="bf_footer">

@ -1,97 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../style/navbar.css">
<link rel="stylesheet" href="../style/style.css">
<link rel="stylesheet" href="../style/inscription.css">
<title>Inscription</title>
<link rel="icon" href="../images/boussole.png">
</head>
<body>
<header>
<nav>
<ul class="navbar" id="navbar">
<li><a href="../index.html">Accueil</a></li>
<li><a href="traces.html">Nos Parcours</a></li>
<li><a href="images.html">Galerie</a></li>
<li><a href="tutos.html">Tutoriels</a></li>
<li><a href="https://www.visugpx.com/editgpx/">Tracer !</a></li>
<li><a id="actual" href="#">S'inscrire</a></li>
<a class="close" href="#"><img src="../images/open.png" id="close"></a>
</ul>
<a class="open" href="#navbar"><img src="../images/open.png" id="open"></a>
<a href="../index.html"><img src="../images/boussole.png" id="boussole"></a>
</nav>
<nav class="navbar2">
<a href="../index.html"><img src="../images/boussole.png" alt="Img Not Found :("></a>
<a href="traces.html">Nos Parcours</a>
<a href="images.html">Galerie</a>
<a href="tutos.html">Tutoriels</a>
<a href="https://www.visugpx.com/editgpx/" target="blank_">Tracer!</a>
<a id=actual href="inscription.html">S'inscrire !</a>
</nav>
</header>
<div class="response">
<?php
$titre = '<h3>Bienvenue Parmi Nous, ';
echo($titre);
echo($_POST['prenom']);
echo(' !</h3>');
$mail = $_POST['mail'];
echo("<p>Un Mail De Confirmation D'inscription à été envoyé à l'adresse : <i>$mail</i></p>");
echo("</div>");
?>
<div class="bf_footer">
<h3>#Go Ride Now<br>
#Va Rouler</h3>
</div>
<footer>
<div class="content_4">
<section class="bottom_left">
<a href="../index.html"><img src="../images/boussole.png"></a>
<p>
Run & Bike In Mountain @2022 All Rights Reserved.<br>
See Here Our <a href="#">Terms And Conditions.</a><br>
Dudonné Baptiste BUT 1 2022-2023.
</p>
</section>
<section class="bottom_right">
<p>Follow Us On :</p>
<a href="#">Facebook</a>
<a href="#">Twitter</a>
<a href="#">intragram</a>
</section>
</div>
</footer>
</body>
</html>
Loading…
Cancel
Save