i have a problem with showing the image from my mysql database
here is my table im working with from my database
CREATE TABLE upload2 ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(30) NOT NULL, type VARCHAR(30) NOT NULL, size INT NOT NULL, path VARCHAR(60) NOT NULL, PRIMARY KEY(id) );
here is the code to show the image
<html> <head> <title>Download File From MySQL</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body>
<?php
$connection = mysql_connect("localhost","root","") or die("impossible de se connecter au serveur mysql.<p>Veuillez réessayer plus tard");
$res = mysql_select_db("upload3") or die("impossible de sélectionner la base de données <b>ecole</b>.<p>Veuillez réessayer plus tard");
$requeteStr = "SELECT path FROM upload2 where id = 4";
$resultatRequete = mysql_query($requeteStr) or die("la requete de sélection a échoué.<p>Veuillez réessayer plus tard");
$result=mysql_query($requeteStr);
while ($row = mysql_fetch_array($result))
{
$path = $row['path'];
echo $path;
?>
<img src="<?$path;?>" border="0">
<?php
}
?>
so whats wrong about it ?
it showing me an icone instead of the image... its
sad that because i have just one post, i cant show any screenshot of what its look like atm...
but does anyone has a clue why it shows an icone instead of the image ?
Edited by Jaan, 16 November 2008 - 03:50 AM.
Please use code tags when you're posting your codes!


Sign In
Create Account


Back to top









