Unexpected $end in

mseyidnaphp Messages postés 4 Statut Membre -  
mseyidnaphp Messages postés 4 Statut Membre -
qlq peut met aider de coriger mon erreur.
voici l'erreur :
syntax error, unexpected $end in

et voici mon code :

<?php while($ET=mysql_fetch_assoc($rs)){?>
            <tr>
                <td><?php echo($ET['CODE'])?></td>
                <td><?php echo($ET['NOM'])?></td>
                <td><?php echo($ET['PHOTO'])?></td>
            </tr>

            <?php}?>


EDIT : Ajout des balises de code (la coloration syntaxique).
Explications disponibles ici : ICI

Merci d'y penser dans tes prochains messages.

2 réponses

  1. DerkoFR Messages postés 652 Statut Membre 74
     
    Bonjour,

    Une formule de politesse pour commencer le sujet ?

    Pour ton code, je vois pas ce que tu essayes de faire, tu peux expliquer mieux ?

    edit : Tu peux aussi mettre un titre correcte ;) (Problème code PHP unexpected $end in) par exemple.

    Cordialement
    Alexandre.

    Apprenti développeur.
    HTML,CSS, PHP & JAVA (Créateur de SiteWEB)
    0
    1. mseyidnaphp Messages postés 4 Statut Membre
       
      Merci de m'excuser de n'est pas debuté mon message par une formule de politesse.

      Voici mon code complet :
      <?php
      require_once ("connection.php");
      $req="select*from etudients";
      $rs=mysql_query($req) or die(mysql_error());
      ?>
      <html>
      <body>
      <table border="1" width="80%">
      <tr>
      <th>CODE</th><th>NOM</th><th>PHOTO</th>
      </tr>
      <?php while($ET=mysql_fetch_assoc($rs)){?>
      <tr>
      <td><?php echo($ET['CODE'])?></td>
      <td><?php echo($ET['NOM'])?></td>
      <td><?php echo($ET['PHOTO'])?></td>
      </tr>

      <?php}?>
      </table>
      </body>
      </html>

      et lorsque j'appelle le fichier php : http://127.0.0.1:8888/SCOLARITE/AfficherEtudiants.php

      l'erreur suivant s'affiche :
      Parse error: syntax error, unexpected $end in C:\Program Files (x86)\EasyPHP-5.3.6.0\www\SCOLARITE\AfficherEtudiants.php on line 22
      0
    2. mseyidnaphp Messages postés 4 Statut Membre
       
      <?php 
      require_once ("connection.php");
      $req="select*from etudients";
      $rs=mysql_query($req) or die(mysql_error());
      ?>
      <html>
      <body>
      <table border="1" width="80%">
      <tr>
      <th>CODE</th><th>NOM</th><th>PHOTO</th>
      </tr>
      <?php while($ET=mysql_fetch_assoc($rs)){?>
      <tr>
      <td><?php echo($ET['CODE'])?></td>
      <td><?php echo($ET['NOM'])?></td>
      <td><?php echo($ET['PHOTO'])?></td>
      </tr>

      <?php}?>
      </table>
      </body>
      </html>
      0
    3. mseyidnaphp Messages postés 4 Statut Membre
       
      Excuser je suis débutant.
      C'est mon premier jour sur ce forum.
      prier de m'aider sur ce sujet.
      0