$sql = "SELECT * FROM $table_name";
$result = mysql_query($sql);
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($result) == 0) {
echo "No rows found, nothing to print so am exiting";
exit;
}
while ($row = mysql_fetch_assoc($result)) {
echo '<table border="1" align=center class=trwhite>';
echo '<tr>';
echo' <th >First Name<th >Last Name<th >Address<th >Zip Code<th >state<th >picture';
echo' </tr>';
echo ' <tr>';
echo ' <td width="50">';
echo $row["fname"];
echo ';</td>';
echo ' <td width="125">';
echo $row["lname"];
echo '</td>';
echo ' <td width="300">';
echo $row["address"];
echo ' </td>';
echo ' <td width="50">';
echo $row["zip"];
echo '</td>';
echo ' <td width="75">';
echo $row["st"];
echo ' </td>';
// this is where I'm having problems all I get is a bunch of characters if I don't use the header. With the header in it current position I get the web address.
I'm trying this as an array and would like multiple photos and information in a single table.
echo ' <td width="250" rowspan="4">';
header('Content-type: image/jpg');
echo $row["picture"];
echo '</td>';