So I am retrieving some location data from a form, and submits the form to a php script. I want it to be that people can type in an address, postcode, or place name, and it converts it into a postcode for processing.
How would I convert the place name into a postcode?
You can have a look at Geonames Web Services.
An example query to look info by place names can be
http://api.geonames.org/postalCodeSearch?placename=sydney&maxRows=10&username=demo