<?php

include 'config.inc.php';


$sql = "
SELECT * FROM tblPromotii pro ORDER BY pro.ID ASC
	";

$result = mysqli_query($conn,$sql);

$response = array();

while ($row = mysqli_fetch_array($result))
{
    array_push($response,
        array(
            "ID"=>$row[0],
            "IDCafea"=>$row[1],
            "Descriere"=>$row[2],
            "Poza"=>$row[3],
            "DataTerminare"=>$row[4]
        ));
}


echo json_encode(array("server_response"=>$response));

//echo json_encode($response);


mysqli_close($conn);


?>