pull picture from DB
Posted: Tue Jan 26, 2010 1:36 pm
hi all,
I'am new in PHP, and i have problem with pictures...if u can tell me how can i pull picture from data base(picture is stored in DB as path to picture)
code:
this gets me only that txt from table, I tryed something but didnt make it...
i'am working in dreamweaver cs3
thx all
I'am new in PHP, and i have problem with pictures...if u can tell me how can i pull picture from data base(picture is stored in DB as path to picture)
code:
Code: Select all
$con=mysql_connect("localhost","root","");
mysql_select_db("aiesec", $con); // odabir baze
$result=mysql_query("SELECT * FROM prakse");
$counter=0;
while($row=mysql_fetch_array($result)){
$counter++;
if ($counter%2==0){
$add=" class=\"alt\">";
}else{
$add=">";
}
echo " <tr>\n";
echo " <td" . $add . $row['praksa'] . "</td>\n";
echo " <td" . $add . $row['PICTURE'] . "</td>\n";
echo " </tr>\n";
}
?>
i'am working in dreamweaver cs3
thx all