Sending data to php service


I did a simple web app with AngularJS and PHP that I cadaster users in the database and works perfectly.
I’m trying to do the same with ionic, but the following message appears in the console:
“ionic.bundle.js:19341 POST http://localhost:8888/sistemas/sistemas_web/ionic/crudAngular/www/php/salvar.php 500 (Internal Server Error)”

Why this happens?

For an error 500 only the server knows the reason, look at your logs on PHP side.