title: how to update data in server database in same field in iphone
body: <p>I am updating my data but it not updating why it happen </p>
  
  <p>i want if any register user want to change data old to new then i give a update page where the user change there data but except username i try lot byt it's not updata data to server databasetable  my cod is proper or wrong </p>
  
  <pre><code> -(void)sendRequest
      {
          NSString *post = [NSString stringWithFormat:@"firstname=%@&amp;lastname=%@&amp;Username=%@&amp;Password=%@&amp;Email=%@",txtfirstName.text,txtlast.text,txtUserName.text,txtPassword.text,txtEmail.text];
          NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; 
          NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; 
          NSLog(@"%@",postLength);
          NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; 
          [request setURL:[NSURL URLWithString:@"http://192.168.0.1:96/JourneyMapperAPI?RequestType=Register&amp;Command=SET"]]; 
          [request setHTTPMethod:@"POST"]; 
          [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; 
          [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; 
          [request setHTTPBody:postData];
  
          NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
  
          if (theConnection) {
              webData = [[NSMutableData data] retain];
              NSLog(@"%@",webData);
          }
          else 
          {
  
          }
  
      }
  
  
  
      -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response 
      {   
          [webData setLength: 0]; 
      } 
  
      -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data 
      {         
          [webData appendData:data]; 
  
      } 
  
      -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error 
      {     
          [connection release];  
          [webData release]; 
      } 
  
      -(void)connectionDidFinishLoading:(NSURLConnection *)connection 
      {      
          NSString *loginStatus = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding]; 
          NSLog(@"%@",loginStatus);  
  
          }
  </code></pre>