tags:

views:

67

answers:

0

Hi,

I am trying to update a MS SQL Server database from my iPhone application.

Here is what I have in the XCode:

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.xxxxx.com/UploadTextView.php"]];
   [request setHTTPMethod:@"POST"];

   NSString *postString = self.textView.text;
   [request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]];

I'm looking for the PHP code to update a single field in the db using the textView text.

We've written a PHP script to update the db, however this only works when a submit button is clicked. We were wondering how to get this script to work when it is called from the application.