View Full Version : Need to show the images from database into table

11-14-2008, 05:08 AM
Can any one tell me.. Iam using Dreamweaver CS4
I need to display the images from my database into a table and my images are in the this folder
but in the code this line is not working
if i give the complete path like this
then i can see the images in the table
please tell me what wrong iam doing
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
function connect()
$conn= mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'.mysql_error());
return $conn;
<table border="1" align="center" height="290" width="533" cellpadding="0" cellspacing="0">
<td align="center">
$query2="select style from styles";
$query="select path from styles";
echo mysql_num_rows($result);
echo '<table align="center" width="55%" height="60%" BORDERCOLOR="#C6C6C6" >'; for($r=1;$r<=3;$r++)
echo '<tr>';
echo '<td border="2" width="15px" height="25px" name="img1"><img width="187px" height="109px"
echo '</tr>';
echo '</table>';

11-14-2008, 05:55 AM
you need to debug your code if its not working

did you copy and paste this or did you write it