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


$query='SELECT a.* FROM jobs a';// WHERE id='.$_GET['banner_id'];

$row = mysqli_query($con,$query);
     
    if (mysqli_num_rows($row) >= 1) {
		//$r=mysqli_fetch_array($row)	;
			
		 while($r=mysqli_fetch_array($row)){
		//echo "test";	 
			$cities[]=['id'=>$r['id'],'merchant_email'=>$r['merchant_email'],'image'=>$r['image'],'title'=>$r['title'],'location'=>$r['location'],'company_name'=>$r['company_name'],'type'=>$r['type'],'contact_no'=>$r['contact_no'],'last_date'=>$r['last_date'],'salary'=>$r['salary'],'description'=>$r['description']];
			
			// $cities['images']=$images;
			
			
		}   
		$errors['jobs']=$cities;
		//$errors['product_images']=$images;
		$errors['success']='Job data';
    } else {
        
		$errors['success']='There is no Job found';
    }
	echo json_encode($errors);
?>