contact-form.php 3.31 KB
<?php
/* copyright 2016 - Thibaut LOMBARD */ 
	//affiche les messages d'errreurs
	ini_set("display_errors",1);
	//Start session
	session_start();
	?><html>
<head>
<script src="https://www.thibautlombard.space/js/jquery.min.js"></script>
<link rel='stylesheet prefetch' href='css/bootstrap.min.css'>
<link rel="stylesheet" href="https://www.thibautlombard.space/css/style.min.css">
<script src="https://www.thibautlombard.space/js/modernizr.min.js"></script>
<script src="https://www.thibautlombard.space/js/bootstrap.min.js"></script>


</head>
<body>
<section id="last">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 text-center">
                    <h2 class="margin-top-0 wow fadeIn">Contactez Moi !</h2>
                    <hr class="primary">
                    <p>Pour du travail, des infos, des bugs...</p>
                    <?php
						/*
						 * Validation des champs valide après enregistrement sur register-form.html
						 */
						if( isset($_SESSION['VALIDMSG_ARR']) && is_array($_SESSION['VALIDMSG_ARR']) && count($_SESSION['VALIDMSG_ARR']) >0 ) {
							foreach($_SESSION['VALIDMSG_ARR'] as $msg) {
							echo '<h2 class="text-center">Merci de votre communication!</h2>
									<p class="text-center">'.$msg.'</p>
									'; 
							}

							unset($_SESSION['VALIDMSG_ARR']);
						}
						?>
						<?php
						/*
						 * Validation des champs invalide lors du login 
						 */
						if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
							echo '<h2 class="text-center">Erreur !</h2>';
							foreach($_SESSION['ERRMSG_ARR'] as $msg) {	
							echo '<p class="text-center">',$msg,'</p>'; 
	     						}
	     					
   							unset($_SESSION['ERRMSG_ARR']);
		    			}
						?>
                </div>
                <div class="col-lg-10 col-lg-offset-1 text-center">
                    <form class="contact-form row" method="post" action="mail.php" id="contact-form">
                        <div class="col-md-4">
                            <label></label>
                            <input type="text" name="nomprenom" class="form-control" placeholder="Nom, prénom">
                        </div>
                        <div class="col-md-4">
                            <label></label>
                            <input type="text" name="email" class="form-control" placeholder="Email">
                        </div>
                        <div class="col-md-4">
                            <label></label>
                            <input type="text" name="telephone" class="form-control" placeholder="Téléphone">
                        </div>
                        <div class="col-md-12">
                            <label></label>
                            <textarea class="form-control" name="message" rows="9" placeholder="Votre message ici.."></textarea>
                        </div>
                        <div class="col-md-4 col-md-offset-4">
                            <label></label>
                            <button type="submit" class="btn btn-primary btn-block btn-lg" id="envoi">Envoyer <i class="ion-android-arrow-forward"></i></button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </section>
</body>
</html>