<?php
//include connection to database variables
include "databaseconnect.php";
// formulate and run town query
$townquery = "SELECT town_name FROM ts_town_tbl WHERE town_id = $town_id";
$townname = mysql_query($townquery,$connection) or die("Error in town query");
while($towndata = mysql_fetch_row($townname)) {
//this is where my problem is
$banner_file = $towndata[0],".gif";
//if the file exists show that towns banner
if(file_exists($banner_file) {
echo "<p align=center><img src=\"";
include "showtown.php";
echo ".gif\"></p>";
}
?>