So using PHP I could get data from a database on the server and serve it as a web page, but how do I get from an Arduno in one location to write to a database on a server somewhere else?
Would I connect the Arduino to a local machine running something like processing to get the data and then send it to that server?
To have the arduino post data to a central server there are two ways.
Option 1:
As you rightly said hook up the arduino to a PC and run a PC program (processing/python..etc) that can read and post to the web. This solves the purpose but not an elegant solution though but could serve as a good starting point.
Option 2:
Arduino + ethernet shield (needs a wired internet connection) or Arduino + GPRS shield (Uses the cell phone data service) or Arduino + wifi shield (uses wireless internet connection) which could be a stand alone solution posting data to the server.