Problems sending data to the bank with ionic

5

I made a web application, with AngularJS and PHP, here on my computer, where I registered users and emails in the bank and it works perfectly.

I'm trying to do the same with ionic, but when I try to insert, register a user, the following message is displayed in the console:

  

link 500 (Internal Server Error) ...... ionic.bundle.js: 19341 POST

  • Does anyone know why this message?
  • What am I doing wrong?
asked by anonymous 08.10.2015 / 21:54

2 answers

0

Are you consulting a certain api? Error 500 is usually syntax error. I recommend using postman ( link ), doing a post in the same url you are trying.

Trying to enable php errors can help you.

ini_set('display_errors',1);
ini_set('display_startup_erros',1);
error_reporting(E_ALL);
    
15.09.2016 / 13:48
0

Speak Brother,

Of course the error is on the server, you're probably trying to get the data using the $_POST array, I'm sorry to inform you that this will not work, but do not worry there's something you can do,

Before your code, on the server, put this:

$_POST = json_decode(file_get_contents("php://input"),true);

After that usually enter your code, if you are using $ _POST, if you are not using it, know that the above code captures the variables sent to the server and places them in an array.

hug and hope it has been useful :-D

    
18.11.2016 / 11:58