Mon formulaire php ne s'affiche pas correctement

Résolu
AurelienLeCodeur Messages postés 13 Date d'inscription   Statut Membre Dernière intervention   -  
AurelienLeCodeur Messages postés 13 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour, je m'appelle Aurélien et j'ai un problème avec mon site https://www.auresite.ch .
(Je suis vraiment un débutant en la matière, je suis en première année pour faire informaticien développeur d'app.)
Mon site est hébergé au cas ou.
J'ai un formulaire de contact (C'est un test, il n'est pas définitif) ( https://www.auresite.ch/sources/inscriptions.html ) sur ce site et j'ai un problème avec. Je souhaite faire une page qui affiche : Merci pour votre candidature "prénom" "nom" .
J'ai donc mon fichier php que voici :
<html>  
  <?php
  $nom = $_POST['nom'];
  $prenom = $_POST['prenom'];
  echo 'Votre nom : '.$snom;
  ?>
</html>

Et voici la page qui gère les input :
<!-- PR_WEB Cdc Bloch Aurélien 2018.02.09 -->
<!-- En XHTML les balises s'écrivent entièrement en minuscule pour des raisons d'uniformisation -->
<!-- Ce projet est mon cahier des charges -->
<!doctype html>
<html lang="fr">
  <head>
 <meta name="Auteur" content="Aurélien Bloch / Aurelien.Bloch@edueptm.ch" />
 <meta name="description" content="Cahier des charges du module PR-WEB 2017/2018 à l'EPTM pour la classe EMVS-IN 1A" />
 <meta name="keywords" content="GRIMENTZ Contest, Contest 2018, EPTM, PR-WEB, Ecoles des mériers" />
 <meta charset="utf-8" />
 <link rel="stylesheet" type="text/css" href="styles.css" media="screen" />
 <link rel="icon" type="image/gif" href="../medias/icone.png" />
 <script type='text/javascript' src="menu deroulant formulaire.js"></script>
 <title>Inscriptions</title>
 <body>
   <header>
  <h1><a href="../index.html">GRIMENTZ CONTEST 2K18</a></h1><img class="menu" src="../medias/menu.png" onclick="agrandir('menu')" />
  <div id="menu">
    <div id="table">
   <table>
     <tr>
    <th><a href="organisation.html">QUI SOMMES-NOUS ?</a></th>
    <th><a href="resultats.html">RESULTATS</a></th>
    <th><a href="inscriptions.html">INSCRIPTIONS</a></th>
    <th><a href="faq.html">FAQ</a></th>
    <th><a href="conditionsParticipation.html">REGLEMENT</a></th>
     </tr>
     <tr>
    <td><a href="partenaires.html">NOS PARTENAIRES</a></td>
    <td><a href="galerie.html">GALERIE</a></td>
    <td><a href="contact.html">CONTACT</a></td>
    <td><a href="informations.html">INFOS / HORAIRES</a></td>
    <td><a href="acces.html">ACCES</a></td>
     </tr>
   </table>
    </div>
  </div>
   </header>
   <div id="Formulaire">
  <p class="Titre60">FORMULAIRE D'INSCRIPTION</p><br />
  <form method="post" action="formulaire.php">
    <div id="formgauche">
   <label for="Nom">Nom</label>
   <input type="text" name="nom" size="12" required="text" maxlength="15" placeholder="Votre nom" /><br /><br />
   <label for="Prenom">Prenom</label>
   <input type="text" name="prenom" size="12" required="text" maxlength="15" placeholder="Votre prénom" /><br /><br />
   <label for="Email">Email</label>
   <input type="email" name="email" size="12" required="email" maxlength="30" placeholder="Votre email" /><br /><br />
    </div> 
    <div id="formdroite">     
    </div>
    <div id="formbas">
   <p><input type="submit" value="ENVOYER"></p>
   <p><input type="reset" value="REINITIALISER"/></p>
    </div>
  </form>   
   </div>  
   <video autoplay loop id="bgvid">
  <source src="../medias/fond_site.mp4" type="video/mp4">
   </video>
   <footer>
  <h3><a href="https://twitter.com/TimeToSnow2018" onclick="window.open(this.href) ; return false;"><img src="../medias/twitter.png" width="20h3x" />TWITTER - TimeToSnow2018</a></h3>
  <h3><a href="https://www.facebook.com/Time-To-Snow-Contest-441873542897397/" onclick="window.open(this.href) ; return false;"><img src="../medias/facebook.png" width="20h3x" />Facebook - Time To Snow Contest</a></h3>
  <h3><a href="https://www.instagram.com/grimentzcontest2018/?hl=fr" onclick="window.open(this.href) ; return false;"><img src="../medias/instagram.png" width="20h3x" />INSTAGRAM - GRIMENTZCONTEST2018</a></h3>
  <h3><span class="credit">Aurelien Bloch - 2018</span>
  </footer>
   </body>
 </html>

Quelqu'un peut-il m'aider svp ?

1 réponse

NHenry Messages postés 15219 Date d'inscription   Statut Modérateur Dernière intervention   365
 
Ben ...
echo 'Votre nom : '.$nom.' '.$prenom; 


Tu avais mis
echo 'Votre nom : '.$snom;

mais tu la déclare où $snom ?
1
AurelienLeCodeur Messages postés 13 Date d'inscription   Statut Membre Dernière intervention  
 
Juste au dessus non ? On ne peut pas et initialiser et déclarer la variable en même temps ?
0
NHenry Messages postés 15219 Date d'inscription   Statut Modérateur Dernière intervention   365
 
Non, tu déclare $nom et $prenom, mais pas $snom (il y a un s après les $)
0
AurelienLeCodeur Messages postés 13 Date d'inscription   Statut Membre Dernière intervention  
 
Mon dieu...
Je suis fatigué moi...
Merci beaucoup !
Et au niveau de l'affichage tu pourrais m'aider ?
Quand on accède au fichier, il prend tout le code html de la page d'accueil, comment je dois faire pour faire la structure que je souhaite ?
0