How to connet Ionic mobile application with MySQL database

hello I just started to developed with Ionic and I want to know how to connet Ionic mobile application with MySQL database please?
thank u :slight_smile:

If you’re using Ionic 2 you can check this out:

Specifically the “Pulling data from your own server” section.

this is our code i would like to connect ionic mobile with mysq database for a wordpress site:


Adresse email
            <button type="submit" class="register button button-block" ng-click="Newsletter(input)" ng-disabled="signup_form.$invalid">

            <p ng-show="error" class="message error">{{error}}</p>


.controller(‘NewsletterCtrl’, function($scope, $http) {

 $scope.Newsletter = function(input) {



.state(‘’, {
url: “/newsletter”,
views: {
‘menuContent’: {
templateUrl: “views/app/newsletter.html”,
controller: ‘NewsletterCtrl’
data: {
authenticate: true


<?php /* Template Name: Inscription newsletter mobile */ ?> <?php get_template_part('templates/header'); ?>
<?php if (have_posts()) : ?>

	<?php while (have_posts()) : the_post(); ?>

		<h1 class="title-post"><?php the_title(); ?></h1>

		<?php the_breadcrumb(); ?>

		<div class="content-post">
                 $data = json_decode(file_get_contents("php://input"));
                 $email = mysql_real_escape_string($data->email);
                 $qry = 'INSERT INTO lcdjwp_newsletter (email) values ("'.$email.'")';

                 $qry_res = mysql_query($qry);
                 if ($qry_res) {
                    $arr = array('msg' => "Email Created Successfully!!!", 'error' => '');
                    $jsn = json_encode($arr);
                } else {
                    $arr = array('msg' => "", 'error' => 'Error In inserting');
                    $jsn = json_encode($arr);
			<?php the_content(); ?>
		<!-- .content-post -->

	<?php endwhile; ?>

<?php else : ?>

	<!-- Si il n'y a pas de Post, j'affiche cette partie -->

<?php endif; ?>
<?php get_template_part('templates/sidebar'); ?> <?php get_template_part('templates/footer'); ?>

you can refer to the link.

just follow this tutorial in this clear all the sites

i want small help
i created a small register page in ionic and how to store that data into database using php please send me code or screenshots.
otherwise please send me atleast instructions.:pray: