I try to retrieve uploaded images from a directory on the server (image-title is string in the database) with this code (att: $uploadname is the stringname of the image in the database):
$result = mysql_query ("SELECT onderwerp. tekst, datum, foto FROM wijkinfo ORDER BY datum",$link);
$uploadname = $_FILES['foto']['name'];
PRINT "<p align='left'><table>\n";
while ($myrow = mysql_fetch_row($result)) {
printf("<tr><td>Onderwerp: %s<br>Tekst: %s<br>Datum: %s<br>Foto:<br> %s img src=img/$uploadname width=300 height=300 border=1 </tr><tr></p>\n",
$myrow[0], $myrow[1], $myrow[2], $myrow[3], $myrow[4], $myrow[5], $myrow[6]);
}
The result is:
Onderwerp: Amusement
Tekst: abc
Datum: 2005-12-31
Foto:
AnnieSchmidtFr8.jpg1108743985.8086 img src=img/ width=300 height=300 border=1
For me that's quite an achievement, but I'd rather see the picture itself than the stringname.
Can anybody help please??? I'd be very grateful!