Bonjour,
Je voudrai lister le contenu de ma base de données et donc j'ai inscrit ce codemais quand j'ouvre dans localhost ma page php il me marque cette erreur Notice:voici le resultat de ma page php
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 <?php $liaison=mysql_connect("localhost","root",""); mysql_select_db("ma_base2", $liaison) or die(mysql_error()); $sql="select * from infos2"; $infos=mysql_query($sql, $liaison)or die($query . " - " . mysql_error()); ?> <html> <head> <title>Informations</title> </head> <body> <h1>Personnes</h1> <ul> <?php while (($infos2 = mysql_fetch_assoc($infos))!==false): ?> <li> <?php echo $infos2[Nom];?> <?php echo $infos2[Prenom];?> <?php echo $infos2[Telephone];?></li> <?php endwhile; ?> </ul></body> </html> <?php mysql_close($liaison); ?>
par contre il donne bien toutes les données que je lui ai réclamé dans ma requête. Ma question est la suivante:Personnes
Notice: Use of undefined constant Nom - assumed 'Nom' in C:\wamp\www\Devoir_PHP\Liaison_infos2.php on line 16
DOUDOU
Notice: Use of undefined constant Prenom - assumed 'Prenom' in C:\wamp\www\Devoir_PHP\Liaison_infos2.php on line 17
Sylvain
Notice: Use of undefined constant Telephone - assumed 'Telephone' in C:\wamp\www\Devoir_PHP\Liaison_infos2.php on line 18
01 02 03 04 05
Notice: Use of undefined constant Nom - assumed 'Nom' in C:\wamp\www\Devoir_PHP\Liaison_infos2.php on line 16
Poupoune
Notice: Use of undefined constant Prenom - assumed 'Prenom' in C:\wamp\www\Devoir_PHP\Liaison_infos2.php on line 17
Annie
Notice: Use of undefined constant Telephone - assumed 'Telephone' in C:\wamp\www\Devoir_PHP\Liaison_infos2.php on line 18
00 11 22 33 44
Que ce qu'il faut faire pour ne pas avoir ce message Notice: entre les réponses. Je débute avec php et je sollicite votre aide pour m'éclairer merci d'avance.Ironda_83
Partager