The following code works. I just need to add the following in the echo part like:
<table border="1" width="36%">
<tr>
<td width="100%">$my_cards_row[greeting_card_name]</td>
</tr>
<tr>
<td width="100%"><img border=0 height=100 width=100 alt='$my_cards_row[filename]' src='/images/greetingcards/$my_cards_row[filename]'></td>
</tr>
</table>
THANKS
<?php
$db = mysql_connect("xxx", "xxx", "xxx");
mysql_select_db("xxx",$db);
$result = mysql_query("SELECT packid, card_pack_name FROM cardpacks1 ORDER BY packid");
while ($myrow = mysql_fetch_array($result)) {
echo " <br>";
$cards_in_pack = mysql_query("SELECT distinct greeting_card_name, filename FROM greetingcards1 WHERE greetingcards1.packid = $myrow[packid]");
if (!empty($cards_in_pack)) {
while ($my_cards_row = mysql_fetch_array($cards_in_pack)) {
echo "
$my_cards_row[greeting_card_name]
<img border=0 height=100 width=100 alt='$my_cards_row[filename]' src='/images/greetingcards/$my_cards_row[filename]'>";
}
}
}
?>