Published on June 27, 2017 by CodeWithChris

PHP Web Service Code:
codewithchris.lpages.co/yt-mysql-04-php-web-service/

In this video series, I’ll show you how to connect an iPhone app to MySQL. We’ll go through it step by step starting from the beginning.

You’ll learn how to:
– Sign up for web hosting
– Create a new MySQL database
– Set up a MySQL database user
– Set access permission for that user
– Create a PHP web service to access the data
– Create an iOS app with a tableview, multiple screens and a map
– Access the PHP web service via the app to download the data from your MySQL database.

This is a video version of the tutorial here:

The Best Way to Connect Your iOS App to MySQL Database (4 Steps)

For more tutorials on how to build iPhone apps, make sure you subscribe and visit my site where you’ll find a community of like minded learners! Learning something new is always more fun with other people!

Website: codewithchris.com

CodeWithChris is dedicated to teaching beginners and non-programmers all about building iOS apps. On the site, you’ll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have successfully picked up Swift 3, Xcode 8 and app building from my course and materials!

Intro & Outro music
“Heartbreaker” by Jahzzar (www.betterwithmusic.com/)

Leave a Reply

18 Comments on "How to Connect an iOS App to a MySQL Database (Step by Step) – Part 4"

Notify of
avatar

Hmny Qtr
Guest
Hmny Qtr
8 days 6 hours ago

Thanks Chris,i am still new, And i created WordPress site, and if i want to see my information in (service.php) i found coming soon and i want find the information like yours, Also i want to save with ( .php ) extenuation but i can not suggested to me ( .rtf ) can you help me .. To part 4 good, i want continua with your lessens Thanks Dear 🙂

Will Wright
Guest
Will Wright
10 days 8 hours ago

the php server file needs a header. So the server knows it's a .json file. Place header("Content-type", "application/json"); at the top of the php file.

Gang Wei
Guest
Gang Wei
2 months 15 days ago

I found that the service.php page is a blank page with nothing in it, and i don`t know what is going on…

Kyle Bracke
Guest
Kyle Bracke
2 months 12 days ago

Never mind, I named my database table "Location" instead of "Locations". I corrected and it is working now.

Kyle Bracke
Guest
Kyle Bracke
2 months 12 days ago

Same

ViaVanille
Guest
ViaVanille
2 months 19 days ago

Ahh thank you for these vids!! I have a Senior Project to do on making an iOS app for an oil and gas company and I have never worked with xcode or Swift so these are a HUGE help!!

Lawn
Guest
Lawn
5 months 16 hours ago
First off, great tutorial… got it all set up with my database. However…was wondering if you could point me towards a tutorial with multiple segues, with data from the same database ? Which will be useful for me to develop appeven app store (www.appeven.net). Example: I have a database with a bunch of restaurants. Would like initial view to be a choice of states. (Or find restaurant location closest to me) Clicking on a state takes you to a list of all restaurants with that state abbreviation. Clicking on one of those, gives you the name/address/city/state/zip and phone number. Then… Read more »
Lightblue dk
Guest
Lightblue dk
5 months 12 days ago

The links to the other websites (with more info on php)?

CodeWithChris
Guest
CodeWithChris
5 months 12 days ago

Hey Lightblue, i like this site: www.w3schools.com/php/

Lightblue dk
Guest
Lightblue dk
5 months 13 days ago

The links to the other websites (with more info on php)?

CodeWithChris
Guest
CodeWithChris
5 months 13 days ago

Hey Lightblue, i like this site: www.w3schools.com/php/

CodingAndCaffeine
Guest
CodingAndCaffeine
9 months 23 days ago

excellent

Robert Tillman
Guest
Robert Tillman
9 months 23 days ago

Can you release these vids faster

CodeWithChris
Guest
CodeWithChris
9 months 23 days ago

Hey Robert, don't forget that you can check out the completed series here:codewithchris.com/iphone-app-connect-to-mysql-database/

CodingAndCaffeine
Guest
CodingAndCaffeine
9 months 24 days ago

excellent

wpDiscuz