Hi all
First many thanks for looking.
I am putting together a page that selects hotels from a database and i am trying to use include to get a page from each hotel to show. This may sound strange but I am having issues with the SQL so this is the easy way to get over the problem and get it up then I will deal with the SQL later.
Below is the code
[php]
include ‘config.php’;
$query = "SELECT * FROM hotel
";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
echo "{$row[‘name’]}
" .
"{$row[‘address’]}
" .
"{$row[‘page’]}
";
}
[/php]
$ page is where I put the include code but it just comes back with it as it has been put in and does not come back with the included page as I hoped it would. When I put the code into the database I use this
[php]include ‘dhotel.php’[/php]
Thanks for looking and any help would be great