I call a PHP file from POSTMAN with this URL: http://localhost/st/user_login.php?surat=DRIVER&sandi=123
In user_login.php
, I type this to process JSON:
$json = file_get_contents('php://input');
$obj = json_decode($json,true);
$email = $obj['surat'];
$password = $obj['sandi'];
The problem is, $email
always returns a null value.
Can somebody tell me where the problem is?