Below is the code in which I am creating the list of URL s with the information of hotels in a city, the problem is when click on the URL no values are being displayed. please let me know how should i modify the code.
<?php
include ('connectdb.php');
$query = "SELECT type, name, location, landmark FROM table1";
$result = @mysql_query($query);
echo mysql_error();
if ($result) {
while($arr = mysql_fetch_array($result, MYSQL_ASSOC)){
$resultlink = "\n\t<li><a href=\"posts.php?ID={$arr['id']}+{$arr['type']}+{$arr['name']}\">{$arr['name']} {$arr['location']}</a></li>";
$end_result .= '<li>' . $resultlink . '</li>';
$resultlink .= "
\n<p>Name: {$arr['name']}</p>
\n<p>Type: {$arr['type']}</p>
\n<p>Location: {$arr['location']}</p>";
}
echo $end_result;
} else {
echo "<p>Sorry no results for $word</p>";
}
?>