J'ai essayé , J'ai modifié le code html et essayer de coder un code php .
Peux-tu me corriger ? Merci d'avance .
CODE HTML :
<font color="orange"><form action="" method="post">
<fieldset>
<legend>Coordonnées</legend>
<label for="nom" style="display:inline-block;width:110px;"><strong> Nom : </strong></label> <input type="text" name="nom" id="nom"/> <label for="prenom" style="display:inline-block;width:110px;"><strong> Prénom : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="email" style="display:inline-block;width:110px;"><strong>Email:</strong></label> <input type="text" name="email" id="email" /> <label for="tel" style="display:inline-block;width:110px;"><strong>N° de tel. :</strong></label> <input type="text" name="tel" id="tel" /></br></br>
<label for="licence" style="display:inline-block;width:110px;"><strong>N° de licence :</strong></label> <input type="text" name="licence" id="licence" /> <label for="club" style="display:inline-block;width:80px;"><strong>Club :</strong></label> <input type="text" name="club" id="club" /> <label for="points" style="display:inline-block;width:110px;"><strong>Nb. de points :</strong></label> <input type="text" name="points" id="points" />
</fieldset>
</br>
<fieldset>
<legend>Jeudi</legend>
<input type="checkbox" name="jeudi[]" value="A" /> Tableau A </br>
<input type="checkbox" name="jeudi[]" value="B" /> Tableau B</br>
<input type="checkbox" name="jeudi[]" value="C" /> Tableau C</br>
<input type="checkbox" name="jeudi[]" value="D" /> Tableau D</br>
<input type="checkbox" name="jeudi[]" value="E" /> Tableau E</br>
<input type="checkbox" name="jeudi[]" value="F" /> Tableau F</br>
<input type="checkbox" name="jeudi[]" value="G" /> Tableau G</br>
<input type="checkbox" name="jeudi[]" value="H" /> Tableau H</br></br>
<label for="double2400" style="display:inline-block;width:180px;"><strong> Double 2400 pts avec : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="licencedouble" style="display:inline-block;width:180px;"><strong> N° de licence : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="pointsdouble" style="display:inline-block;width:180px;"><strong> Nb de points : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
</fieldset>
</br>
<fieldset>
<legend>Vendredi</legend>
<input type="checkbox" name="vendredi[]" value="I" /> Tableau I </br>
<input type="checkbox" name="vendredi[]" value="X" /> Tableau X </br>
</fieldset>
</br>
<fieldset>
<legend>Samedi</legend>
<input type="checkbox" name="samedi[]" value="J" /> Tableau J </br>
<input type="checkbox" name="samedi[]" value="K" /> Tableau K </br>
<input type="checkbox" name="samedi[]" value="L" /> Tableau L </br>
<input type="checkbox" name="samedi[]" value="M" /> Tableau M </br>
<input type="checkbox" name="samedi[]" value="N" /> Tableau N </br>
<input type="checkbox" name="samedi[]" value="O" /> Tableau O </br>
<input type="checkbox" name="samedi[]" value="P" /> Tableau P </br>
</fieldset>
</br>
<fieldset>
<legend>Dimanche</legend>
<input type="checkbox" name="dimanche[]" value="Q" /> Tableau Q </br>
<input type="checkbox" name="dimanche[]" value="R" /> Tableau R </br>
<input type="checkbox" name="dimanche[]" value="S" /> Tableau S </br>
<input type="checkbox" name="dimanche[]" value="T" /> Tableau T </br>
<input type="checkbox" name="dimanche[]" value="U" /> Tableau U </br>
<input type="checkbox" name="dimanche[]" value="V" /> Tableau V </br></br>
<label for="double4000" style="display:inline-block;width:180px;"><strong> Double 4000 pts avec : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="licencedouble1" style="display:inline-block;width:180px;"><strong> N° de licence : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="pointsdouble1" style="display:inline-block;width:180px;"><strong> Nb de points : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
</fieldset>
</br>
<input type="submit" name="valider" value="Envoyer" /> <input type="reset" name="reinitialiser" value="Réinitialiser" />
</form></font>
CODE PHP :
<?php
$TO = "[email protected]";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://");
echo $_POST['nom'];
echo $_POST['prenom'];
echo $_POST['email'];
echo $_POST['tel'];
echo $_POST['licence'];
echo $_POST['club'];
echo $_POST['points'];
$_POST['jeudi']
$_POST['vendredi']
$_POST['samedi']
$_POST['dimanche']
?>
J'ai essayé , J'ai modifié le code html et essayer de coder un code php .
Peux-tu me corriger ? Merci d'avance .
[b]CODE HTML : [/b]
[html]<font color="orange"><form action="" method="post">
<fieldset>
<legend>Coordonnées</legend>
<label for="nom" style="display:inline-block;width:110px;"><strong> Nom : </strong></label> <input type="text" name="nom" id="nom"/> <label for="prenom" style="display:inline-block;width:110px;"><strong> Prénom : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="email" style="display:inline-block;width:110px;"><strong>Email:</strong></label> <input type="text" name="email" id="email" /> <label for="tel" style="display:inline-block;width:110px;"><strong>N° de tel. :</strong></label> <input type="text" name="tel" id="tel" /></br></br>
<label for="licence" style="display:inline-block;width:110px;"><strong>N° de licence :</strong></label> <input type="text" name="licence" id="licence" /> <label for="club" style="display:inline-block;width:80px;"><strong>Club :</strong></label> <input type="text" name="club" id="club" /> <label for="points" style="display:inline-block;width:110px;"><strong>Nb. de points :</strong></label> <input type="text" name="points" id="points" />
</fieldset>
</br>
<fieldset>
<legend>Jeudi</legend>
<input type="checkbox" name="jeudi[]" value="A" /> Tableau A </br>
<input type="checkbox" name="jeudi[]" value="B" /> Tableau B</br>
<input type="checkbox" name="jeudi[]" value="C" /> Tableau C</br>
<input type="checkbox" name="jeudi[]" value="D" /> Tableau D</br>
<input type="checkbox" name="jeudi[]" value="E" /> Tableau E</br>
<input type="checkbox" name="jeudi[]" value="F" /> Tableau F</br>
<input type="checkbox" name="jeudi[]" value="G" /> Tableau G</br>
<input type="checkbox" name="jeudi[]" value="H" /> Tableau H</br></br>
<label for="double2400" style="display:inline-block;width:180px;"><strong> Double 2400 pts avec : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="licencedouble" style="display:inline-block;width:180px;"><strong> N° de licence : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="pointsdouble" style="display:inline-block;width:180px;"><strong> Nb de points : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
</fieldset>
</br>
<fieldset>
<legend>Vendredi</legend>
<input type="checkbox" name="vendredi[]" value="I" /> Tableau I </br>
<input type="checkbox" name="vendredi[]" value="X" /> Tableau X </br>
</fieldset>
</br>
<fieldset>
<legend>Samedi</legend>
<input type="checkbox" name="samedi[]" value="J" /> Tableau J </br>
<input type="checkbox" name="samedi[]" value="K" /> Tableau K </br>
<input type="checkbox" name="samedi[]" value="L" /> Tableau L </br>
<input type="checkbox" name="samedi[]" value="M" /> Tableau M </br>
<input type="checkbox" name="samedi[]" value="N" /> Tableau N </br>
<input type="checkbox" name="samedi[]" value="O" /> Tableau O </br>
<input type="checkbox" name="samedi[]" value="P" /> Tableau P </br>
</fieldset>
</br>
<fieldset>
<legend>Dimanche</legend>
<input type="checkbox" name="dimanche[]" value="Q" /> Tableau Q </br>
<input type="checkbox" name="dimanche[]" value="R" /> Tableau R </br>
<input type="checkbox" name="dimanche[]" value="S" /> Tableau S </br>
<input type="checkbox" name="dimanche[]" value="T" /> Tableau T </br>
<input type="checkbox" name="dimanche[]" value="U" /> Tableau U </br>
<input type="checkbox" name="dimanche[]" value="V" /> Tableau V </br></br>
<label for="double4000" style="display:inline-block;width:180px;"><strong> Double 4000 pts avec : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="licencedouble1" style="display:inline-block;width:180px;"><strong> N° de licence : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
<label for="pointsdouble1" style="display:inline-block;width:180px;"><strong> Nb de points : </strong></label> <input type="text" name="prenom" id="prenom"/></br></br>
</fieldset>
</br>
<input type="submit" name="valider" value="Envoyer" /> <input type="reset" name="reinitialiser" value="Réinitialiser" />
</form></font>[/html]
[b]CODE PHP :[/b]
[php]<?php
$TO = "
[email protected]";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://");
echo $_POST['nom'];
echo $_POST['prenom'];
echo $_POST['email'];
echo $_POST['tel'];
echo $_POST['licence'];
echo $_POST['club'];
echo $_POST['points'];
$_POST['jeudi']
$_POST['vendredi']
$_POST['samedi']
$_POST['dimanche']
?>[/php]