<?php
require_once 'config.php';
//$error=false;
$errors=array();
$cities=array();

$query="SELECT * FROM settings WHERE id=1";

$row = mysqli_query($con,$query);
     
    if (mysqli_num_rows($row) >= 1) {
		//$r=mysqli_fetch_array($row)	;
			
		while($r=mysqli_fetch_array($row)){
			$cities[]=['id'=>$r['id'],'shipping_charges'=>$r['shipping_charges']];
			
			
		}   
		$errors['shipping']=$cities;
		$errors['success']=true;
		$errors['message']='Shipping charges';
    } else {
        
		$errors['success']=false;
		$errors['message']='There is no log found';
    }
	echo json_encode($errors);
?>