Get user details from mysql db


#1

Any tutorials on how to connect to mysql and retrieve user profile details etc…


#2

You will need to use more than ionic/angular for that, like php asp ect server side language then create ajax call for retrieving json with the user profile info.


#3

will the php script work with ionic framework when you build it with phonegap to install on ios or android…?


#4

Yes, because php will remain on your server and your app will be reaching out to it.


#5

Sorry to hijack but does this mean that the PHP files have to be hosted on a website/server and the Ionic App has to query it? Or is it possivle to have the PHP files hosted inside the app?

$.ajax({ url: 'http://domain.com/my/userUpdate.php',
         data: {action: 'test'},
         type: 'post',
         success: function(output) {
                      alert(output);
                  }
});

http://domain.com/my/userUpdate.php where would this file need to be hosted?


#6

Make a php webservice (preferably serving JSON) connected to your user profiles then user angular $http directive to do ajax