Unexpected $end in

Fermé
mseyidnaphp Messages postés 4 Date d'inscription mardi 22 novembre 2016 Statut Membre Dernière intervention 22 novembre 2016 - Modifié par Chris 94 le 22/11/2016 à 17:43
mseyidnaphp Messages postés 4 Date d'inscription mardi 22 novembre 2016 Statut Membre Dernière intervention 22 novembre 2016 - 22 nov. 2016 à 16:28
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

Chris 94 Messages postés 50978 Date d'inscription mardi 8 janvier 2008 Statut Modérateur Dernière intervention 17 février 2023 7 324
22 nov. 2016 à 15:46
0
DerkoFR Messages postés 504 Date d'inscription vendredi 7 novembre 2014 Statut Membre Dernière intervention 5 janvier 2017 74
Modifié par DerkoFR le 22/11/2016 à 15:52
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
mseyidnaphp Messages postés 4 Date d'inscription mardi 22 novembre 2016 Statut Membre Dernière intervention 22 novembre 2016
22 nov. 2016 à 16:09
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
mseyidnaphp Messages postés 4 Date d'inscription mardi 22 novembre 2016 Statut Membre Dernière intervention 22 novembre 2016
22 nov. 2016 à 16:27
<?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
mseyidnaphp Messages postés 4 Date d'inscription mardi 22 novembre 2016 Statut Membre Dernière intervention 22 novembre 2016
22 nov. 2016 à 16:28
Excuser je suis débutant.
C'est mon premier jour sur ce forum.
prier de m'aider sur ce sujet.
0