Hi, thsnks for the help. one problem I have, where do I put the required code. Below is the code I am working with:
// Start a table, with column headers
echo "\n<table border=\"1\" cellpadding=\"2\" cellspacing\"1\">" .
"\n\t<th width=\"15%\" bgcolor=\"#cccccc\"><font color=\"black\" size=\"-2\" >Location</th>" .
"\n\t<th width=\"25%\" bgcolor=\"#cccccc\"><font color=\"black\" size=\"-2\" face=\"airal\">Guest House</th>" .
"\n\t<th width=\"15%\" bgcolor=\"#cccccc\"><font color=\"black\" size=\"-2\" >Telephone No</th>" .
"\n\t<th width=\"15%\" bgcolor=\"#cccccc\"><font color=\"black\" size=\"-2\" >Fax No</th>" .
"\n\t<th width=\"15%\" bgcolor=\"#cccccc\"><font color=\"black\" size=\"-2\" >Website</th>" .
"\n\t<th width=\"15%\" bgcolor=\"#cccccc\"><font color=\"black\" size=\"-2\" >Tariff</th>" .
"\n</tr>";
echo "\n<tr>\n\t<td></td>\n</tr>";
echo "\n<tr>\n\t<td></td>\n</tr>";
echo "\n<tr>\n\t<td></td>\n</tr>";
// Until there are no rows in the result set,
// fetch a row into the $row array and ...
while ($row = @ mysql_fetch_row($result))
{
// ... start a TABLE row ...
echo "\n<tr>";
// ... and print out each of the attributes
// in that row as a separate TD (Table Data).
foreach($row as $data)
echo "\n\t<td background=\"../../Gif/Background.gif\"> <font color=\"black\" face=\"arial\"size=\"-6\" > $data </td>";
// echo "\n<tr>\n\t<td></td>\n</tr>";
// echo "\n<tr>\n\t<td></td>\n</tr>";
// echo "\n<tr>\n\t<td></td>\n</tr>";
// Finish the row
echo "\n</tr>";
}
// Then, finish the table
echo "\n</table>\n";
}
$query = "select location, name, tel, fax, web, tariff from accom where acctype = 'G' order by location";
// Connect to the MySQL server
HELP Please
Dereck