<?php
include_once '../inc/functions.php';

$rId=$_GET['rId'];

$provinces = R::getAll("select id,name from provinces where region_id ='$rId' order by name");
foreach ($provinces as $p) {
    $id = $p['id'];
    $name = $p['name'];
    echo "<option id='$id'>$name</option>";
}
?>