I'm trying to use ASIHTTPRequest for the first time and struggling to find an example to do the following;
Input box (user enters a name) with a 'lookup' butto开发者_StackOverflow社区n, once the user clicks the button, it looks up the DB for that 'name' and if found, returns with the names email address.
There is 2 columns in the DB- 'name' and 'email'.
How could I do the above or is there an example?
Thanks!
Im assuming this is a remote server DB.
I would suggest using a PHP or similar script to query your DB rather than directly accessing it remotely. This helps with security and simplifies the interface.
Be sure to protect against unauthorised accesss by using an api key-signature method or similar.
Also I would suggest using the NSURLRequest and NSURLConnection classes over the ASI wrapper, they are quite simple to use and avoid third party code.
精彩评论