I am firt time trying DELETE method with fetch in javascript. I just want to read the sent data from my fetch in php. I am doing this:
... in js
fetch(this.url+"?deleteID="+ID,{method:'DELETE'})
... in php
if(($_SERVER['REQUEST_METHOD'] == 'DELETE')){
$id= $_GET["deleteID"];
}
but it is failing and I do not know why. The definition of $_GET is "An associative array of variables passed to the current script via the URL parameters" and I am passing deleteID as a param or not ? (When the method is GET, this works)
Thanks for explanation.
Im sorry, this works... I was using wrong URL