<?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);
    $adresse = $inputdata['adresse'];
    $id = $inputdata['id'];


        $verif=$db->prepare('UPDATE user SET adresse_pm=? WHERE id=?');
        $verif->execute(array($adresse, $id));
        if ($verif) {
            # code...
            echo(json_encode(['reponse' => 1]));
        }else {
            echo(json_encode(['reponse' => 0]));
        }
           

            # code...
            
