include('config.php'); $id_get=$_GET["id"]; $region_tag=$_GET["as"]; $name_tag=$_GET["dd"]; $query = "SELECT id,place,siteName FROM caravan WHERE place=REPLACE('$region_tag','-',' ') AND id='$id_get' AND siteName=REPLACE('$name_tag','-',' ')"; $num = mysqli_num_rows(mysqli_query($link, $query)); if($num < 1){ die(header('Location: /404.php') ); } else $query = "SELECT id,siteName,address,region,google,county,accommodationDescription,place FROM caravan WHERE id='$id_get'"; $result = mysqli_query($link, $query); while($table = mysqli_fetch_array($result)) echo('
'.$table["siteDescription"].'
'.$table["inTheArea"].'
'); ?>