Question: I have made a website (php) and it connects to a database so it can have users and post material. Imagine it like a forum. Now how would I go about making an iPhone app that connects to the same database. I am already teaching myself c++ to make the app, but am not sure how I will connect it to the database.

Answer: 
You need to build out API end points for all the actions that are possible. 

E.g posts/view posts/edit posts/add

A popular and well documented architecture to use would be REST 
<http://en.wikipedia.org/wiki/Representational_state_transfer>

If you are using a PHP framework there are often helper libraries for creating the API

This tutorial should help you understand it
<http://net.tutsplus.com/tutorials/php/creating-an-api-centric-web-application/>
I am a newbie to iphone development and have been working on Iphone for a month or so. Would like to give some tips on this:

1) First read up on Objective-C since you are making an Iphone app and how Xcode in general works

2) Next the connecting to the web API, you could use AFNetworking. Here is a [Tutorial](http://mobile.tutsplus.com/tutorials/iphone/ios-sdk_afnetworking/) to get started. You need to know what is the API to get the data. 

3) Next you need to parse the data depending whether it is an JSON or XML data from the API. This will allow you to get the data.

4)You can now display in the Xcode using the UI