Bonjour tout le monde,

J'apprends le PHP avec un livre.

J'ai recopié un exemple de ce livre et il m'indique une erreur :

Parse error: syntax error, unexpected '>' in C:\wamp\www\admin.php on line 38
La ligne 38 correspond à ceci :


Voici l'entierté de mon code, sauriez-vous me dire si vous voyez quelque chose d'erroné ?

Merci d'avance et bon Dimanche.

beegees


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
 
if (!($_SERVER['PHP_AUTH_USER'] == "essai" && 
	$_SERVER['PHP_AUTH_PW']="essai"))
	{
		header("Status: 401 Unauthorized");
		header("HTTP/1.0 401 Unauthoriezd");
		header('WWW-authenticate: Basic '.
			' realm="acess securise au back-office"');
		print("verification : ERREUR");
		exit(0);	
	}
 
echo "<html>";
echo "<head>";
echo "<title> Fiches etudiants</title>";
echo "<body>";
 
$liendb = mysql_connect("localhost", "root","mdp");
mysql_select_db("deliberations");
 
$sql = "SELECT * FROM etudiants";
 
$resultat = mysql_query($sql);
 
echo "<h1>admin - ecole </h1>";
echo "<p align=left> :: accueil </p>";
 
echo "<table width=90% align=center border=1>";
echo "<tr><td>Matricule</td><td>Nom</td><td>Prenom</td></tr>;

while ($eleve = mysql_fetch_array(&resultat))
{
	$matricule = $eleve('Matricule_Et'];
	$nom = $eleve('Nom_Et'];
	$prenom = $eleve('Prenom_Et'];
	echo "<tr>";
	echo "<td>$matricule</td>";
	ecbo "<td>$nom</td>";
	echo "<td>$prenom</td>";
	echo "</tr>";
	
}

echo "</table>";
	
	mysql_close($liendb);
	
	echo "</body>";
	ecbo "</html>";	








?>