I want to create an iphone application that is able to post the data to a website database which is using MySQL. Can anyone give some hints?
You probably want to create a REST API. Check out this link: http://blog.poundbang.in/post/47182656/building-a-rest-api-for-your-iphone-sdk-app-using
You'll need to use NSURLConnection and NSURLRequest to send the data to the server.
http://ODBCrouter.com/ipad (new) has XCode client-side ODBC libraries that let you send SQL queries to most server-side databases and get back binary results into your program variables. There is an advantage in that you don't need to spend the significant effort to create a web service and maintain backwards compatibility with earlier releases of your app as it evolves. By using the industry standard ODBC programming interface (in concert with a server-based MySQL ODBC driver), you are also set if you wish to dump MySQL and in favor of DB/2, Oracle, SQLServer, SQLite, etc.