angularjs - Sending status codes in PHP does not work as expected -
i'm trying check if username available registering doing async validation angularjs on client side , php on server side.
so simple check if user exists:
$user = user::find_by('username', $_get['username']); if ($user) { header("http/1.1 200 ok"); } else { header("http/1.1 404 not found"); } and try return status codes if finds user or not.
but when try use postman send requests returning status code 200. doesn't i'm able send different status codes @ all.
Comments
Post a Comment