<?php
session_start();
    header('Access-Control-Allow-Origin:*');
    header('Content-Type; application/json; charset=utf-8');
    header('Access-control-Allow-Method: POST');
    header('Access-control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-request-With');
    include('db.php');
        $inputdata = json_decode(file_get_contents("php://input"), true);
        
        $des="";
        $id="";
        
        $pub=$db->prepare('SELECT prix_boisson.id AS id,CONCAT(boisson.nom," ", prix_boisson.designation) AS nom FROM boisson, prix_boisson WHERE boisson.id=prix_boisson.boisson AND boisson.qte_stock>? ');
        $pub->execute(array(0));
        $pubs = $pub->fetchAll();    
        
        echo(json_encode(['data' => $pubs]));