Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Création et traitement d’un formulaire d’inscription

 formulaire
{filelink=14090}


 <html>
  <head>
  <title>Inscription</title>
  </head>
  <body>
  <h2 align="center">Formulaire d'inscription</h2>
  <form name="forml" method="post" action="executerInscription.php" enctype="multipart/form-data">
    <table width="53%" border="0" align="center" cellpadding="5" cellspacing="0">
      <tr>
        <td width="49%">Nom</td>
        <td colspan="2">
          <div align="left">
           <input type="text" name="nom" size="25" maxlength="25">
         </div>
        </td>
      </tr>
      <tr>
        <td width="49%"></td>
        <td height="2" colspan="2"></td>
      </tr>
      <tr>
        <td width="49%" height="57">Adresse</td>
        <td height="57" colspan="2">
          <textarea name="address" cols="25" rows="4">  </textarea>
        </td>
      </tr>
      <tr>
        <td width="49%"></td>
        <td height="2" colspan="2"></td>
      </tr>
      <tr>
        <td width="49%"> Date de Naissance</td>
        <td height="2" colspan="2">
          <select name=mois_naissance>
            <option selected value=1>Janvier
            <option value=2> Fevrier
            <option value=3>Mars
            <option value=4>Avril
            <option value=5>Mai
            <option value=6>Juin
            <option value=7>Juillet
            <option value=8>Août
            <option value=9>Septembre
            <option value=10>Octobre
            <option value=11>Novembre
            <option value=12>Decembre
      </select>
      <select name=jour_naissance>
            <option selected value=1>01
            <option value=2>02
            <option value=3>03
            <option value=4>04
            <option value=5>05
            <option value=6>06
            <option value=7>07
            <option value=8>08
            <option value=9>09
            <option value=10>10
            <option value=11>11
            <option value=12>12
            <option value=13>13
            <option value=14>14
            <option value=15>15
            <option value=16>16
            <option value=17>17
            <option value=18>18
            <option value=19>19
            <option value=20>20
            <option value=21>21
            <option value=22>22
            <option value=23>23
            <option value=24>24
            <option value=25>25
            <option value=26>26
            <option value=27>27
            <option value=28>28
            <option value=29>29
            <option value=30>30
            <option value=31>31</option>
          </select>
          <input maxlength=4 name=annee_naissance size=4>
             (Year)</td>
      </tr>
      <tr>
        <td width="49%" height="2"></td>
        <td height="2" width="17%"></td>
        <td height="2" width="34%"></td>
      </tr>
      <tr>
        <td width="49%">Sexe</td>
        <td height="2" width="17%"><input type="radio" name="gender" value="M">Male </td>
        <td height="2" width="34%"><input type="radio" name="gender" value="F">Female </td>
      </tr>
      <tr>
        <td width="49%" height="5"></td>
        <td height="5" colspan="2"></td>
      </tr>
      <tr>
        <td width="49%">Loisirs </td>
        <td height="2" colspan="2">
          <table width="100%" border="0">
            <tr>
              <td>
                <input type="checkbox" name="sport" value="1">
                   Sport </td>
              <td>
                <input type="checkbox" name="lecture" value="1">
                   Lecture </td>
            </tr>
            <tr>
              <td>
                <input type="checkbox" name="surf" value="1">
                   Surf </td>
              <td>
                <input type="checkbox" name="cinema" value="1">
                   Cinema </td>
            </tr>
            <tr>
              <td>
                <input type="checkbox" name="musique" value="1">
                   Musique </td>
              <td></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="49%" height="2"></td>
        <td colspan="2" height="2"></td>
      </tr>

      <tr>
        <td colspan="3">
          <div align="center">
            <input type="submit" name="Submit" value="Envoyer">
          </div>
        </td>
      </tr>
    </table>
  </form>
  </body>
  </html>

<!--   executerInscription.php

<html>
  <head>
  <title>Confirmation</title>
  </head>
  <body>
  <h2> Chèr(e)
  <?php
     if ($gender=='M') {
       echo "Mr.";
     } elseif ($gender=='F') {
       echo "Ms.";
     }
     echo " ", $nom;
     ?> ! You have entered the following information: </h2>
     <table border="1">
       <tr>
         <td>Adresse </td>
         <td>
           <?php echo $address; ?>
         </td>
       </tr>
       <tr>
         <td>Date de Naissance </td>
         <td>
           <?php echo $mois_naissance, " ", $jour_naissance, " ", $annee_naissance; ?>
         </td>
       </tr>
       <tr>
         <td colspan=2>Vos Loisirs:
  <?php
  if (!(empty($sport))) {
      if ($sport==1){
         echo " Sport ";
      }
  }
  if (!(empty($surf))) {
     if ($surf==1) {
         echo " Surf ";
     }
  }
  if (!(empty($lecture))) {
     if ($lecture==1){
         echo " Lecture ";
     }
  }
  if (!(empty($musique))) {
     if ($musique==1) {
         echo " Musique ";
     }
  }
  if (!(empty($cinema))) {
     if ($cinema==1){
         echo " Cinema ";
     }
  }
?>
</td>
</tr>

  </table>
  </body>
  </html>
-->

No comments yet.

Leave a Comment