<?php
//database settings
include "config.php";
//update the values
$qtext='select district,clubname from clubs where status="Active"';
//echo $qtext;
$res=mysqli_query($con,$qtext) or mysqli_error();
$rows = array();
while($r = mysqli_fetch_assoc($res)) {
$rows[] = $r;
}
//print json_encode($rows);
file_put_contents('clubs.json', json_encode($rows));
echo "Updated";
?>