<?php
include 'config/db.php';

header("Content-Type: application/xml; charset=utf-8");

echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<!-- Home -->
<url>
<loc>https://travellholiday.com/</loc>
<priority>1.0</priority>
</url>

<!-- Contact -->
<url>
<loc>https://travellholiday.com/contact.php</loc>
<priority>0.8</priority>
</url>

<?php
// TOUR PAGES AUTO ADD
$query = mysqli_query($conn, "SELECT id, seo_title FROM tours WHERE status='approved'");

while($row = mysqli_fetch_assoc($query)) {

$slug = strtolower(str_replace(" ", "-", $row['seo_title']));

echo "<url>
<loc>https://travellholiday.com//tour_details.php?id=".$row['id']."</loc>
<priority>0.9</priority>
</url>";
}
?>

</urlset>