Rectangle 27 0

api Request Response with PHP front end and back end?


die('Incorrect Length for Password');
echo 'Incorrect Length for Password');
ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(-1);

HttpResponse is only available when using pecl_http. The default way to output content with php is to simply echo it. In rare occasions you might want to exit processing after some content, you could use die for that.

I feel so dumb... durp durp durp... Thank you... But if I echo from the server side, how do I rerender the login page with lets say an alert?

This should only be considered for developing though.

You also might want to add error reporting into your PHP file, preferably at the beginning:

Note
Rectangle 27 0

api Request Response with PHP front end and back end?


die('Incorrect Length for Password');
echo 'Incorrect Length for Password');
ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(-1);

HttpResponse is only available when using pecl_http. The default way to output content with php is to simply echo it. In rare occasions you might want to exit processing after some content, you could use die for that.

I feel so dumb... durp durp durp... Thank you... But if I echo from the server side, how do I rerender the login page with lets say an alert?

This should only be considered for developing though.

You also might want to add error reporting into your PHP file, preferably at the beginning:

Note