Click here to Skip to main content
15,867,851 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
$request_body = file_get_contents('php://input');
$data = json_decode($request_body,true);
$email = $data["email"];

What I have tried:

$data is having null value, even after putting values while testing API through Thunder client working fine when $_POST variable is used
Thanks in advance
Posted
Updated 21-Apr-22 1:57am
v5
Comments
Richard MacCutchan 21-Apr-22 8:09am    
If its value is null then you need to use the debugger to find out why. No one here can do that for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900