Erreur dans mon code[PHP]

Résolu/Fermé
drogba7213 Messages postés 1521 Date d'inscription mardi 14 août 2007 Statut Membre Dernière intervention 3 avril 2010 - 28 mai 2008 à 10:18
drogba7213 Messages postés 1521 Date d'inscription mardi 14 août 2007 Statut Membre Dernière intervention 3 avril 2010 - 28 mai 2008 à 10:44
Bonjour,

J'ai grand besoin d'un spécialiste php et sur ce forum ce n'est pas ce qu'il manque!!! Dieu merci

En faite j'ai un soucis dans mon premier formulaire je prend les saisies et les retournent dans un fichier et renvoie vers un autre formulaire qui lui par la suite servira a vérifier les saisies des deux formulaires.
Jusque la pas de problème
ensuite par rapport a mon dernier formulaire j'envoie la saisie pour qu'elle remplisse un autre formulaire mais ce coup ci dans un pdf et la par contre j'ai un soucis c'est à dire que mes variable nom,prenom,naissance,lieu, dpt,nationalité,adresse, mail fonctionne très bien mais pas les autres.
Je voulais voir si vous pourriez jetez un coup d'oeuil car j'ai beua chercher...
Je vous met les trois scripts.

concours_ts.html

Code :

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<script language="javascript">
//fonction verification si champs remplis
//si le champ est vide, elle fait un message d'alerte et renvoie false donc le formulaire n'est pas envoyé
//si tous les champs testés par les if ne sont pas vides elle renvoie true et le formulaire est envoyé
function verif_champs(){
if(document.getElementById('fichier').value == ""){
alert("Vous devez remplir le champ photo !");
return false
}
if(document.getElementById('nom').value == ""){
alert("Vous devez remplir le champ Nom !");
return false
}
if(document.getElementById('prenom').value == ""){
alert("Vous devez remplir le champ Prénom !");
return false
}
if(document.getElementById('naissance').value == ""){
alert("Vous devez remplir le champ Né le !");
return false
}
if(document.getElementById('lieu').value == ""){
alert("Vous devez remplir le champ Lieu !");
return false
}
if(document.getElementById('dpt').value == ""){
alert("Vous devez remplir le champ Département !");
return false
}
if(document.getElementById('nationalite').value == ""){
alert("Vous devez remplir le champ Nationalité !");
return false
}
if(document.getElementById('adresse').value == ""){
alert("Vous devez remplir le champ Adresse !");
return false
}
if(document.getElementById('telephone').value == ""){
alert("Vous devez remplir le champ Téléphone !");
return false
}
if(document.getElementById('portable').value == ""){
alert("Vous devez remplir le champ Portable !");
return false
}
if(document.getElementById('mail').value == ""){
alert("Vous devez remplir le champ E-mail !");
return false
}
if(document.getElementById('classe').value == ""){
alert("Il faut au moins une classe dans les études secondaires !");
return false
}
if(document.getElementById('option').value == ""){
alert("Il faut au moins une option dans les études secondaires !");
return false
}
if(document.getElementById('annee').value == ""){
alert("Il faut au moins une année dans les études secondaires !");
return false
}
if(document.getElementById('classe5').value == ""){
alert("Il faut au moins une classe dans les études supérieures !");
return false
}
if(document.getElementById('option5').value == ""){
alert("Il faut au moins une option dans les études supérieures !");
return false
}
if(document.getElementById('annee5').value == ""){
alert("Il faut au moins une année dans les études secondaires !");
return false
}
if(document.getElementById('diplome').value == ""){
alert("Il faut au moins un diplome dans les diplomes obtenus !");
return false
}
if(document.getElementById('mention').value == ""){
alert("Il faut au moins une mention dans les diplomes obtenus !");
return false
}
if(document.getElementById('annee9').value == ""){
alert("Il faut au moins une année dans les diplomes obtenus !");
return false
}
return true;
}
</script>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>concours_ts</title>


</head>


<body>

<form action="concours_ts.php" method="post" onsubmit="return verif_champs();" enctype="multipart/form-data"><br>

<div style="text-align: center;"><big><img style="width: 122px; height: 121px;" alt="" src="smalllogo.gif"><br>

<br>

</big><big>DOSSIER
D'INSCRIPTION</big><br>

<big>CONCOURS TS - 2009</big><br>

<big>Réservé aux candidats en
scolarité</big><br>

<big>du B.T.S. Géomètre-Topographe</big><br>

</div>

<div style="text-align: center;"><small>(Candidats
présentant la même année le B.T.S. et
concours ESGT)<br>

<br>

<br>

</small>
<div style="text-align: left;">Faites nous parcourir une
photo d'identité récente : <input name="fichier" value="" id="fichier" type="file"></div>

<small><br>

<br>

<br>

</small>
<div style="text-align: left;"><span style="font-weight: bold;">Nom : </span><input style="font-weight: bold;" name="nom" id="nom" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;"> 
       
       
       
       
    Prénom :   
</span><input style="font-weight: bold;" name="prenom" id="prenom" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;"> </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">Né(e) le :
 </span><input style="font-weight: bold;" name="naissance" id="naissance" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
  
       
       
       
       
   Lieu :
 </span><input style="font-weight: bold;" name="lieu" id="lieu" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
        
   Dépt : </span><input style="font-weight: bold;" name="dpt" id="dpt" value="" size="2" maxlength="2" type="text"><span style="font-weight: bold;"> <br>

</span><span style="font-weight: bold;"><br>

       
       
       
       
       
       
       
       
       
       
       
       
       
 Nationalité : </span><input style="font-weight: bold;" name="nationalite" id="nationalite" value="" size="30" maxlength="30" type="text"><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">Adresse : </span><br style="font-weight: bold;">

<textarea style="font-weight: bold;" type="text" name="adresse" id="adresse" rows="10" cols="50"></textarea><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">Téléphone
: </span><input style="font-weight: bold;" name="telephone" id="telephone" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
 
       
       
       
       
       
       
       
       
       
     
Télécopie : </span><input style="font-weight: bold;" name="telecopie" id="telecopie" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;"> </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">Portable : </span><input style="font-weight: bold;" name="portable" id="portable" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
       
       
       
       
       
       
       
       
       
     E-mail : </span><input style="font-weight: bold;" name="mail" id="mail" value="" size="50" maxlength="50" type="text"><span style="font-weight: bold;"> </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">ETUDES SECONDAIRES</span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">Etabliseements
fréquentés :</span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="classe" id="classe" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   Classe /
Option </span><input style="font-weight: bold;" name="option" id="option" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
   
      Année
:
 </span><input style="font-weight: bold;" name="annee" id="annee" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;">
  </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="classe2" id="classe2" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   Classe /
Option </span><input style="font-weight: bold;" name="option2" id="option2" value="" size="30" maxlength="30"><span style="font-weight: bold;">
     
   
      Année
:
 </span><input style="font-weight: bold;" name="annee2" id="annee2" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;">
  </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="classe3" id="classe3" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   Classe /
Option </span><input style="font-weight: bold;" name="option3" id="option3" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
   
      Année
:
 </span><input style="font-weight: bold;" name="annee3" id="annee3" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;">
  </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="classe4" id="classe4" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   Classe /
Option </span><input style="font-weight: bold;" name="option4" id="option4" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
   
      Année
:
 </span><input style="font-weight: bold;" name="annee4" id="annee4" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;">
  </span><br style="font-weight: bold;">

<span style="font-weight: bold;">   
   
       
       
       
       
       
       
     
       
    </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">ETUDES SUPERIEURES</span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">Etablissements
fréquentés (préciser la
ville) :</span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="classe5" id="classe5" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   Classe /
Option </span><input style="font-weight: bold;" name="option5" id="option5" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
   
      Année
:
 </span><input style="font-weight: bold;" name="annee5" id="annee5" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;">
  </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="classe6" id="classe6" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   Classe /
Option </span><input style="font-weight: bold;" name="option6" id="option6" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
   
      Année
:
 </span><input style="font-weight: bold;" name="annee6" id="annee6" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;">
  </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="classe7" id="classe7" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   Classe /
Option </span><input style="font-weight: bold;" name="option7" id="option7" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
   
      Année
:
 </span><input style="font-weight: bold;" name="annee7" id="annee7" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;">
  </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="classe8" id="classe8" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   Classe /
Option </span><input style="font-weight: bold;" name="option8" id="option8" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
     
   
      Année
:
 </span><input style="font-weight: bold;" name="annee8" id="annee8" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;">
    </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">DIPLOMES OBTENUS</span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<input style="font-weight: bold;" name="diplome" id="diplome" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   
       
     
    Mention </span><input style="font-weight: bold;" name="mention" id="mention" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
  
      Année :  </span><input style="font-weight: bold;" name="annee9" id="annee9" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;"> </span><br style="font-weight: bold;">

<input style="font-weight: bold;" name="diplome2" id="diplome2" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">   
   
       
       
  Mention </span><input style="font-weight: bold;" name="mention2" id="mention2" value="" size="30" maxlength="30" type="text"><span style="font-weight: bold;">
  
      Année :
 </span><input style="font-weight: bold;" name="annee10" id="annee10" value="" size="4" maxlength="4" type="text"><span style="font-weight: bold;"> </span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">DECLARATION SUR
L'HONNEUR</span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">Je
soussigné(e), NOM :   
       
       
       
       
       
       
       
       
       
       
Prénom :</span><br style="font-weight: bold;">

<span style="font-weight: bold;">certifie sur l'honneur
que les informations ci-dessus ainsi que celles
portées sur l'ensemble des pièces du dossier sont
exactes.</span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<span style="font-weight: bold;">Fait
à   
       
       
       
       
       
       
       
        , le
       
       
       
       
       
       
       
       
       
       
    SIGNATURE</span><br style="font-weight: bold;">

<br style="font-weight: bold;">

<div style="text-align: center; font-weight: bold;"><big><big>
<input value="Valider" name="submit" type="submit">  
        
   
       
    </big></big><input value="annuler" type="reset"></div>

<span style="font-weight: bold;" class="nt"></span><br>

<span class="na"></span><span class="s"></span><span class="na"></span><span class="s"></span><span class="na"></span><span class="s"></span><span class="na"></span><span class="s"></span><span class="na"></span><span class="s"></span><span class="na"></span><span class="s"></span><span class="nt"></span></div>

</div>

</form>

</body>
</html>

concours_ts.php
Code :


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>


<body>



<form action="pdfconcours_ts.php" method="post" enctype="multipart/form-data"><br>



<?php $msg = " Votre inscription ".$_POST['nom']." ".$_POST['prenom']." nous est bien parvenue Vérifiez que les informations sont correctes svp. ";
echo "$msg ";

// Test si le fichier a bien été envoyé et s'il n'y a pas d'erreur
if (isset($_FILES['fichier']) AND $_FILES['fichier']['error'] == 0)
{
// Test si le fichier n'est pas trop gros
if ($_FILES['fichier']['size'] <= 5000000)
{
// Test si l'extension est autorisée
$infosfichier = pathinfo($_FILES['fichier']['name']);
$extension_upload = $infosfichier['extension'];
$extensions_autorisees = array('jpg', 'jpeg', 'gif', 'png');
if (in_array($extension_upload, $extensions_autorisees))
{
// On peut valider le fichier et le stocker définitivement

move_uploaded_file($_FILES['fichier']['tmp_name'], $_SERVER['DOCUMENT_ROOT']."/".$_FILES['fichier']['name']);
echo $_SERVER['DOCUMENT_ROOT'];
//move_uploaded_file($_FILES['fichier']['tmp_name'], $_SERVER['DOCUMENT_ROOT'].$_FILES['fichier']['name']);
echo "L'envoi a bien été effectué !";
}
else
{
echo "cependant votre photo ne possède pas la bonne extension. Elle passera en jpg, jpeg, gif, png. ";
}
}
else
{
echo "cependant votre photo est tros grosse pas plus de 5 Mo. ";
}
}
$fichier = $_POST['fichier'];
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$naissance = $_POST['naissance'];
$lieu = $_POST['lieu'];
$dpt = $_POST['dpt'];
$nat = $_POST['nationalite'];
$adresse = $_POST['adresse'];
$tel = $_POST['telephone'];
$telecopie = $_POST['telecopie'];
$port = $_POST['portable'];
$mail = $_POST['mail'];
$c1 = $_POST['classe'];
$o1 = $_POST['option'];
$a1 = $_POST['annee'];
$c2 = $_POST['classe2'];
$o2 = $_POST['option2'];
$a2 = $_POST['annee2'];
$c3 = $_POST['classe3'];
$o3 = $_POST['option3'];
$a3 = $_POST['annee3'];
$c4 = $_POST['classe4'];
$o4 = $_POST['option4'];
$a4 = $_POST['annee4'];
$c5 = $_POST['classe5'];
$o5 = $_POST['option5'];
$a5 = $_POST['annee5'];
$c6 = $_POST['classe6'];
$o6 = $_POST['option6'];
$a6 = $_POST['annee6'];
$c7 = $_POST['classe7'];
$o7 = $_POST['option7'];
$a7 = $_POST['annee7'];
$c8 = $_POST['classe8'];
$o8 = $_POST['option8'];
$a8 = $_POST['annee8'];
$d1 = $_POST['diplome'];
$m1 = $_POST['mention'];
$a9 = $_POST['annee9'];
$d2 = $_POST['diplome2'];
$m2 = $_POST['mention2'];
$a10 = $_POST['annee10'];




//écriture depuis fin du fichier
$fp = fopen("fichier.txt","a+");
fputs($fp, "\n"); // on va a la ligne
// on écrit dans le fichier
fputs($fp, "$nom , $prenom , $naissance , $lieu , $dpt , $adresse , $tel , $telecopie , $port , $mail , $c1 , $o1 , $a1 , $c2 , $o2 , $a2 , $c3 , $o3 , $a3 , $c4 , $o4 , $a4 , $c5 , $o5 , $a5 , $c6 , $o6 , $a6 , $c7 , $o7 , $a7 , $c8 , $o8 , $a8 , $d1 , $m1 , $a9 , $d2 , $m2 , $a10 \n");
fclose($fp);
?>


<div style="text-align: center;"><big><img style="width: 122px; height: 121px;" alt="" src="file:///C:/Documents%20and%20Settings/slelais/Bureau/site/smalllogo.gif"></big><br>


</div>


<br>



<div style="text-align: center;"><big>DOSSIER
D'INSCRIPTION</big><br>




<big>CONCOURS TS - 2009</big><br>




<big>Réservé aux candidats en
scolarité</big><br>




<big>du B.T.S. Géomètre-Topographe</big><br>






<small>(Candidats
présentant la même année le B.T.S. et
concours ESGT)</small><br>


</div>


<br>


<br>


<br>


<br>
<span style="font-weight: bold;">

Nom :</span>       <input name="nom" type="text"<?php if (isset($_POST['nom'])) // Si on a le pseudo rentré par le visiteur
{
echo 'value="' . $_POST['nom'] . '"'; // On pré-remplit le champ avec le pseudo du visiteur
}


?>


/>
 
       
       
       
              
           
           
           
    <span style="font-weight: bold;">   Prénom :</span>  <input name="prenom" type="text"<?php if (isset($_POST['prenom']))
{
echo 'value="' . $_POST['prenom'] . '"';
}

?>

/>
   <br>




<br>
<span style="font-weight: bold;">

Né(e) le :</span>  <input name="naissance" type="text"<?php if (isset($_POST['naissance']))
{
echo 'value="' . $_POST['naissance'] . '"';
}

?>

/>

  
       
       
       
             
           
           
           
       <span style="font-weight: bold;"> Lieu :</span>
 <input name="lieu" type="text"<?php if (isset($_POST['lieu']))
{
echo 'value="' . $_POST['lieu'] . '"';
}

?>

/>

     
        
           
          <span style="font-weight: bold;"> Dépt :</span>  <input name="dpt" type="text"<?php if (isset($_POST['dpt']))
{
echo 'value="' . $_POST['dpt'] . '"';
}

?>

/>
<br>

        
           
          <span style="font-weight: bold;"> Dépt :</span>  <input name="nat" type="text"<?php if (isset($_POST['nationalite']))
{
echo 'value="' . $_POST['nationalite'] . '"';
}

?>


<br>
<span style="font-weight: bold;">



Adresse :</span>   <input size="100" maxlength="100" name="adresse" type="text"<?php if (isset($_POST['adresse']))
{
echo 'value="' . $_POST['adresse'] . '"';
}

?>

/>
<br>




<br>




<br>
<span style="font-weight: bold;">

Téléphone :</span> <input name="tel" type="text"<?php if (isset($_POST['telephone'])) //
{
echo 'value="' . $_POST['telephone'] . '"';
}

?>

/>

 
       
       
       
       
       
       
       
       
             
   <span style="font-weight: bold;">
Télécopie :</span> <input name="telecopie" type="text"<?php if (isset($_POST['telecopie']))
{
echo 'value="' . $_POST['telecopie'] . '"';
}

?>

/>
<br>




<br>
<span style="font-weight: bold;">

Portable : </span>   <input name="port" type="text"<?php if (isset($_POST['portable']))
{
echo 'value="' . $_POST['portable'] . '"';
}

?>

/>

     
       
       
       
       
       
       
       
       
       
        <span style="font-weight: bold;">E-mail :</span> <input name="mail" type="text"<?php if (isset($_POST['mail']))
{
echo 'value="' . $_POST['mail'] . '"';
}

?>

/>
<br>




<br>




<span style="font-weight: bold;">
ETUDES SECONDAIRES</span><br style="font-weight: bold;">




<br style="font-weight: bold;">




<span style="font-weight: bold;">
Etabliseements fréquentés :</span><br>




<br>




<br>




  <input name="c1" type="text"<?php if (isset($_POST['classe']))
{
echo 'value="' . $_POST['classe'] . '"';
}

?>

/>
       
           
           
           
   <span style="font-weight: bold;">Classe /
Option</span> <input name="o1" type="text"<?php if (isset($_POST['option']))
{
echo 'value="' . $_POST['option'] . '"';
}

?>

/>

     
   
              
           
               <span style="font-weight: bold;">Année
:</span>
 <input name="a1" type="text"<?php if (isset($_POST['annee']))
{
echo 'value="' . $_POST['annee'] . '"';
}

?>

/>

  <br>




<br>




  <input name="c2" type="text"<?php if (isset($_POST['classe2']))
{
echo 'value="' . $_POST['classe2'] . '"';
}

?>

/>
           
           
           
           <span style="font-weight: bold;">Classe
/
Option</span> <input name="o2" type="text"<?php if (isset($_POST['option2']))
{
echo 'value="' . $_POST['option2'] . '"';
}

?>

/>

     
   
              
           
               <span style="font-weight: bold;">Année
:</span>
 <input name="a2" type="text"<?php if (isset($_POST['annee2']))
{
echo 'value="' . $_POST['annee2'] . '"';
}

?>

/>

  <br>




<br>




  <input name="c3" type="text"<?php if (isset($_POST['classe3']))
{
echo 'value="' . $_POST['classe3'] . '"';
}

?>

/>
       
           
           
           
   <span style="font-weight: bold;">Classe /
Option</span> <input name="o3" type="text"<?php if (isset($_POST['option3']))
{
echo 'value="' . $_POST['option3'] . '"';
}

?>

/>

     
   
              
           
               <span style="font-weight: bold;">Année
:</span>
 <input name="a3" type="text"<?php if (isset($_POST['annee3']))
{
echo 'value="' . $_POST['annee3'] . '"';
}

?>

/>

  <br>




  <input name="c4" type="text"<?php if (isset($_POST['classe4']))
{
echo 'value="' . $_POST['classe4'] . '"';
}

?>

/>
       
           
           
           
   <span style="font-weight: bold;">Classe /
Option</span> <input name="o4" type="text"<?php if (isset($_POST['option4']))
{
echo 'value="' . $_POST['option4'] . '"';
}

?>

/>

     
   
              
           
               <span style="font-weight: bold;">Année
:</span>
 <input name="a4" type="text"<?php if (isset($_POST['annee4']))
{
echo 'value="' . $_POST['annee4'] . '"';
}

?>

/>

  <br>




<br>




<span style="font-weight: bold;">
ETUDES SUPERIEURES</span><br style="font-weight: bold;">




<br style="font-weight: bold;">




<span style="font-weight: bold;">
Etablissements fréquentés (préciser la
ville) :</span><br>




<br>




<br>




  <input name="c5" type="text"<?php if (isset($_POST['classe5']))
{
echo 'value="' . $_POST['classe5'] . '"';
}

?>

/>
       
           
           
           
    <span style="font-weight: bold;">Classe /
Option</span> <input name="o5" type="text"<?php if (isset($_POST['option5']))
{
echo 'value="' . $_POST['option5'] . '"';
}

?>

/>

     
   
           
           
           
     <span style="font-weight: bold;">Année
:
</span> <input name="a5" type="text"<?php if (isset($_POST['annee5']))
{
echo 'value="' . $_POST['annee5'] . '"';
}

?>

/>

  <br>




<br>




  <input name="c6" type="text"<?php if (isset($_POST['classe6']))
{
echo 'value="' . $_POST['classe6'] . '"';
}

?>

/>
         
           
           
           
  <span style="font-weight: bold;">Classe /
Option</span> <input name="o6" type="text"<?php if (isset($_POST['option6']))
{
echo 'value="' . $_POST['option6'] . '"';
}

?>

/>

     
   
             
           
           
   <span style="font-weight: bold;">Année
:</span>
 <input name="a6" type="text"<?php if (isset($_POST['annee6']))
{
echo 'value="' . $_POST['annee6'] . '"';
}

?>

/>

  <br>




<br>




   <input name="c7" type="text"<?php if (isset($_POST['classe7']))
{
echo 'value="' . $_POST['classe7'] . '"';
}

?>

/>
       
           
           
           
    <span style="font-weight: bold;">Classe /
Option</span> <input name="o7" type="text"<?php if (isset($_POST['option7']))
{
echo 'value="' . $_POST['option7'] . '"';
}

?>

/>

     
   
           
           
           
    <span style="font-weight: bold;">Année
:</span>
 <input name="a7" type="text"<?php if (isset($_POST['annee7']))
{
echo 'value="' . $_POST['annee7'] . '"';
}

?>

/>

  <br>




<br>




  <input name="c8" type="text"<?php if (isset($_POST['classe8']))
{
echo 'value="' . $_POST['classe8'] . '"';
}

?>

/>
        
           
           
           
     <span style="font-weight: bold;">Classe /
Option</span> <input name="o8" type="text"<?php if (isset($_POST['option8']))
{
echo 'value="' . $_POST['option8'] . '"';
}

?>

/>

     
   
             
           
           
 <span style="font-weight: bold;">Année
:</span>
 <input name="a8" type="text"<?php if (isset($_POST['annee8']))
{
echo 'value="' . $_POST['annee8'] . '"';
}

?>

/>

    <br>




<br>




<span style="font-weight: bold;">
DIPLOMES OBTENUS</span><br>




<br>




  <input name="d1" type="text"<?php if (isset($_POST['diplome']))
{
echo 'value="' . $_POST['diplome'] . '"';
}

?>

/>
      
            
           
           
      <span style="font-weight: bold;">Mention</span> <input name="m1" type="text"<?php if (isset($_POST['mention']))
{
echo 'value="' . $_POST['mention'] . '"';
}

?>

/>

  
           
           
           
           
        <span style="font-weight: bold;"> Année : </span>  <input name="a9" type="text"<?php if (isset($_POST['annee9']))
{
echo 'value="' . $_POST['annee9'] . '"';
}

?>

/>
<br>




  <input name="d2" type="text"<?php if (isset($_POST['diplome2']))
{
echo 'value="' . $_POST['diplome2'] . '"';
}

?>

/>
      
       
       
           
           
   <span style="font-weight: bold;">Mention</span> <input name="m2" type="text"<?php if (isset($_POST['mention2']))
{
echo 'value="' . $_POST['mention2'] . '"';
}

?>

/>

  
             
           
           
           
      <span style="font-weight: bold;"> Année :</span>
  <input name="a10" type="text"<?php if (isset($_POST['annee10']))
{
echo 'value="' . $_POST['annee10'] . '"';
}
?>

/>
<br>




<br>




<span style="font-weight: bold;">
DECLARATION SUR L'HONNEUR</span><br>




<br>




Je soussigné(e), <span style="font-weight: bold;">Nom :</span> <input name="nom2" type="text"<?php if (isset($_POST['nom']))
{
echo 'value="' . $_POST['nom'] . '"';
}

?>

/>
  
       
       
       
       
       
  
<span style="font-weight: bold;">Prénom :</span> <input name="prenom2" type="text"
<?php
if (isset($_POST['prenom']))
{
echo 'value="' . $_POST['prenom'] . '"';
}
?>

/>
<br>




certifie sur l'honneur que les informations ci-dessus ainsi que celles
portées sur l'ensemble des pièces du dossier sont
exactes.<br>




<br>
<span style="font-weight: bold;">



Fait à </span>  
       
       
       
       
       
       
       
       <span style="font-weight: bold;"> , le</span>
       
       
       
       
       
       
       
       
       
       
   <span style="font-weight: bold;"> SIGNATURE</span><br>




<br>






<div style="text-align: center;"><big><big><span style="font-weight: bold;">
<input value="Valider" name="submit" type="submit">  
        
   
       
    </span></big></big><input value="annuler" type="reset"></div>




<span class="nt"></span><br>


<br>




</form>

<?php
$GLOBALS['fichier'];
$GLOBALS['nom'];
$GLOBALS['prenom'];
$GLOBALS['naissance'];
$GLOBALS['lieu'];
$GLOBALS['dpt'];
$GLOBALS['nationalite'];
$GLOBALS['adresse'];
$GLOBALS['tel'];
$GLOBALS['telecopie'];
$GLOBALS['portable'];
$GLOBALS['mail'];
$GLOBALS['classe'];
$GLOBALS['option'];
$GLOBALS['annee'];
$GLOBALS['classe2'];
$GLOBALS['option2'];
$GLOBALS['annee2'];
$GLOBALS['classe3'];
$GLOBALS['option3'];
$GLOBALS['annee3'];
$GLOBALS['classe4'];
$GLOBALS['option4'];
$GLOBALS['annee4'];
$GLOBALS['classe5'];
$GLOBALS['option5'];
$GLOBALS['annee5'];
$GLOBALS['classe6'];
$GLOBALS['option6'];
$GLOBALS['annee6'];
$GLOBALS['classe7'];
$GLOBALS['option7'];
$GLOBALS['annee7'];
$GLOBALS['classe8'];
$GLOBALS['option8'];
$GLOBALS['annee8'];
$GLOBALS['diplome'];
$GLOBALS['mention'];
$GLOBALS['annee9'];
$GLOBALS['diplome2'];
$GLOBALS['mention2'];
$GLOBALS['annee10'];
?>
</body>
</html>

A voir également:

2 réponses

drogba7213 Messages postés 1521 Date d'inscription mardi 14 août 2007 Statut Membre Dernière intervention 3 avril 2010 21
28 mai 2008 à 10:22
pdfconcours_ts.php
Code :


<?php

//$GLOBALS['nom'];
//$GLOBALS['prenom'];
//$GLOBALS['naissance'];
//$GLOBALS['lieu'];
//$GLOBALS['dpt'];
//$GLOBALS['nat'];
//$GLOBALS['adresse'];
//$GLOBALS['tel'];
//$GLOBALS['telecopie'];
//$GLOBALS['port'];
//$GLOBALS['mail'];
//$GLOBALS['c1'];
//$GLOBALS['o1'];
//$GLOBALS['a1'];
//$GLOBALS['c2'];
//$GLOBALS['o2'];
//$GLOBALS['a2'];
//$GLOBALS['c3'];
//$GLOBALS['o3'];
//$GLOBALS['a3'];
//$GLOBALS['c4'];
//$GLOBALS['o4'];
//$GLOBALS['a4'];
//$GLOBALS['c5'];
//$GLOBALS['o5'];
//$GLOBALS['a5'];
//$GLOBALS['c6'];
//$GLOBALS['o6'];
//$GLOBALS['a6'];
//$GLOBALS['c7'];
//$GLOBALS['o7'];
//$GLOBALS['a7'];
//$GLOBALS['c8'];
//$GLOBALS['o8'];
//$GLOBALS['a8'];
//$GLOBALS['d1'];
//$GLOBALS['m1'];
//$GLOBALS['a9'];
//$GLOBALS['d2'];
//$GLOBALS['m2'];
//$GLOBALS['a10'];





define('FPDF_FONTPATH','font/');
require('fpdf.php');
class PDF extends FPDF
{
//En-tête
function Header()
{
//Logo
$this->Image('smalllogo.png',180,1);
//Police Arial gras 15
$this->SetFont('Arial','',6);
//Décalage à droite
$this->Cell(0,30);
//définition stratégique des x et des y
$largeurDeLaPage = 210 ; // mm
$largeurDeLaCell1 = 1;
$largeurDeLaCell5 = 40;
$largeurDeLaCell2 = 80;
$largeurDeLaCell3 = 100;
$largeurDeLaCell4 = 160;
$largeurDeLaCell6 = 180;
$yQuelconque1 = 3;
$yQuelconque25 = 60;
$yQuelconque26 = 69;
$yQuelconque27 = 78;
$yQuelconque28 = 87;
$yQuelconque5 = 96;
$yQuelconque6 = 105;
$yQuelconque7 = 114;
$yQuelconque8 = 123;
$yQuelconque9 = 132;
$yQuelconque010 = 141;
$yQuelconque011 = 150;
$yQuelconque012 = 159;
$yQuelconque013 = 168;
$yQuelconque014 = 177;
$yQuelconque015 = 186;
$yQuelconque016 = 195;
$yQuelconque017 = 204;
$yQuelconque018 = 213;
$yQuelconque019 = 222;
$yQuelconque20 = 231;
$yQuelconque21 = 240;
$yQuelconque22 = 249;
$yQuelconque23 = 258;
$yQuelconque24 = 267;
$yQuelconque29 = 276;
$yQuelconque2 = 20;
$yQuelconque3 = 10;
$yQuelconque4 = 30;
//Epaisseur du cadre (1 mm)
$this->SetLineWidth(0.2);
$this->SetXY($largeurDeLaCell1, $yQuelconque1);
$this->multiCell($largeurDeLaCell2, $yQuelconque1,"Ecole supérieure des Géomètre et Topographes\n1, boulevard Pythagore - Campus Universitaire - 72000 LE MANS\nhttps://www.esgt.cnam.fr/\n" , 0 , "L" , 0);
$this->Ln(5);
$this->SetXY(($largeurDeLaPage - $largeurDeLaCell2)/2, $yQuelconque2);
//Titre
//$this->SetDrawColor(204,204,204);
$this->multiCell($largeurDeLaCell2, $yQuelconque1,"DOSSIER D'INSCRIPTION\nCONCOURS TS -2008\nRéservé aux candidats en scolarité\ndu B.T.S. Géomètre-Topographe\n(Candidats présentant la même année le B.T.S. et le concours ESGT)" , 1 , "C" , 0);
$this->Ln(5);
//$this->SetXY($largeurDeLaCell6, $yQuelconque2);
//$this->multiCell($yQuelconque5, $yQuelconque4,$GLOBALS['fichier'] , 1 , "C" , 0);
//première ligne
$this->SetFont('Arial','',10);
$this->SetXY($largeurDeLaCell1, $yQuelconque25);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " Nom : ". $GLOBALS['nom'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque25);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Prénom : ".$GLOBALS['prenom'] , 0 , "L" , 0);
$this->Ln(5);

//deuxième ligne
$this->SetXY($largeurDeLaCell1, $yQuelconque26);
$this->multiCell($largeurDeLaCell3, $yQuelconque1, " Né(e) le : ". $GLOBALS['naissance'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque26);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Lieu : " .$GLOBALS['lieu'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque26);
$this->multiCell($yQuelconque2, $yQuelconque1, "Dépt : " .$GLOBALS['dpt'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell3, $yQuelconque27);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Nationalité : " .$GLOBALS['nat'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque28);
$this->multiCell($largeurDeLaCell4, $yQuelconque1, " Adresse : " .$GLOBALS['adresse'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque5);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " Téléphone : " .$GLOBALS['telephone'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque5);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Télécopie : " .$GLOBALS['telecopie'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque6);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " Portable : " .$GLOBALS['portable'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque6);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "E-Mail : " .$GLOBALS['mail'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque7);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " ETUDES SECONDAIRES", 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque8);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " Etablissement fréquentés : " , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque9);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['classe'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque9);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Classe / Option " .$GLOBALS['option'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque9);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque010);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['classe2'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque010);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Classe / Option " .$GLOBALS['option2'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque010);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee2'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque011);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['classe3'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque011);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Classe / Option " .$GLOBALS['option2'], 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque011);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee2'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque012);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['classe4'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque012);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Classe / Option " .$GLOBALS['option4'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque012);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee4'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque013);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " ETUDES SUPERIEURES" , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque014);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " Etablissement fréquentés :" , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque015);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['classe5'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque015);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Classe / Option " .$GLOBALS['option5'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque015);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee5'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque016);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['classe6'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque016);
$this->multiCell($largeurDeLaCell2, $yQuelconque1,"Classe / Option " .$GLOBALS['option6'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque016);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee6'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque017);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['classe7'], 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque017);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Classe / Option " .$GLOBALS['option7'], 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque017);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee7'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque018);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['classe8'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque018);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Classe / Option " .$GLOBALS['option8'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque018);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee8'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque019);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " DIPLOMES OBTENUS" , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque20);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['diplome'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque20);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Mention " .$GLOBALS['mention'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque20);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee9'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque21);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, $GLOBALS['diplome2'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell3, $yQuelconque21);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, "Mention " .$GLOBALS['mention2'] , 0 , "L" , 0);
$this->SetXY($largeurDeLaCell4, $yQuelconque21);
$this->multiCell($largeurDeLaCell5, $yQuelconque1, "Année : " .$GLOBALS['annee10'] , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque22);
$this->multiCell($largeurDeLaCell2, $yQuelconque1, " DECLARATION SUR L'HONNEUR" , 0 , "L" , 0);
$this->Ln(5);

$this->SetXY($largeurDeLaCell1, $yQuelconque23);
$this->multiCell($largeurDeLaCell6, $yQuelconque1, " Je soussigné, NOM : " .$GLOBALS['nom']. " Prénom : " .$GLOBALS['prenom']."\n certifie sur l'honneur que les informations ci-dessus ainsi que celles portées sur l'ensemble des pièces du \n dossier sont exactes", 0 , "L" , 0);
$this->Ln(0);

$this->SetXY($largeurDeLaCell1, $yQuelconque24);
$this->multiCell($largeurDeLaCell6, $yQuelconque1, " Fait à ,le SIGNATURE" , 0 , "C" , 0);
}
}



//Pied de page
function Footer()
{
//Positionnement à 0,5 cm du bas
$this->SetY(-5);
//Police Arial italique 8
$this->SetFont('Arial','I',8);
//Numéro de page
$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
}


//Instanciation de la classe dérivée
$nom = $_POST["nom"];
$pdf=new PDF('P','mm','A4');
$pdf->Open();$pdf->AliasNbPages();
//$pdf->AddPage();
$pdf->SetFont('Times','',12);
$pdf->Cell(50,10,'Impression de la ligne numéro '.$i,0,1);
$pdf->Output();
?>

Désolé pour tout ces posts mais j'étais obligé il y a une limite de caractères

Merci d'avance
0
drogba7213 Messages postés 1521 Date d'inscription mardi 14 août 2007 Statut Membre Dernière intervention 3 avril 2010 21
28 mai 2008 à 10:44
Excusez moi mais c'est bon j'ai réglé le problème
0