Get response from a HTTP page

So what do you have in your console when you try it ?
If you want i can share you my screen with discord/teamviewer :confused:

code is working fine…i only got the error of api php file.

This is realy strange because i have paste your code …

Can you send me the app.module.ts you have use plz ?

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { HttpModule } from '@angular/http';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

@NgModule({
  declarations: [
    MyApp,
    HomePage
  ],
  imports: [
    BrowserModule,
    HttpModule,
    IonicModule.forRoot(MyApp),
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
  ]
})
export class AppModule {}

In ionic 3, you do not have to map the response to json. It returns json data in default.

Try to return a sample data directly from php file without using database query and see if you can get the data in the response. If yes, then you have error in the php file.

1 Like
please check the URl which you are using...

`this.http.get('[http://www.api.les-cherubins-photographie.fr/index.php?action=CheckUserExist&user=Nicolas](http://www.api.les-cherubins-photographie.fr/index.php?action=CheckUserExist&user=Nicolas)')`
it should be like this...
this.http.get('http://www.api.les-cherubins-photographie.fr/index.php?action=CheckUserExist&user=Nicolas')