Bonjour


Bdd = UTIL
Table = client
Dans la table client j'ai deux champs un champ nom et un champ photo
l'image est dans un dossier images sous WWWW en localhost
et j'ai rempli ce champ photo par :images/didier.jpeg chemin de l'image


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
 
<html> <title> </title> 
<head></head> 
<body> 
<?php 
$db="UTIL"; 
$user="root"; 
$link=mysql_connect("localhost","root","")or die("impossoble de se connecter"); 
mysql_select_db($db)or die ("impossible d'ouvrir $db:".mysql-error()); 
 
$result=mysql_query("SELECT * from clients"); 
print"<table align=center border="5" bordercolor="CC6633">\n"; 
while($rows = mysql_fetch_array($result) 
{ 
print"<tr>"; 
$nom = $rows['nom']; 
$photo = $rows['photo']; 
echo"<td> $nom </td>"; 
echo"< img = ????? 
} 
print"</table>"; 
mysql_close($link); 
?> 
</body> 
</html>
Script html qui fonctionne

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
<html> 
<title></title> 
<head></head> 
<body> 
<img src="images/didier.jpeg" width ="100" height="100"> 
</body> 
</html>
Comment faire en php ?????
Et que dois je mette dans la table au niveau photo
le but étant d'afficher le nom (ex Didoer et sa photo ???
Dans le champ photo dois je y mettre didier.jpeg ou bien images/didier.jpeg ??

Merci de votre aide