<?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">

    <url>
        <loc>https://voltup-worldwide.com/</loc>
        <priority>1.00</priority>
    </url>

    <?php
    include "db.php";
    // Жишээ: courses хүснэгтээс
    $result = mysqli_query($conn, "SELECT id FROM courses");
    while($row = mysqli_fetch_assoc($result)){
        echo "<url>
                <loc>https://voltup-worldwide.com/course.php?id={$row['id']}</loc>
                <priority>0.80</priority>
              </url>";
    }
    ?>
</urlset>
