jorjewelrydsc
New Member
I am having problems with the code below trying to create a feedback form in my iPhone app and passing through a php mailer page and I wonder if the error below may be the cause.The following code shows this problem 'Data argument not used by format string' refering to this \[code\]@"%@?email=%@&message="\[/code\] in particular\[code\]NSString *email = [self.emailTxt text];NSString *message = [self.messageTxt text];NSURL *url = [NSURL URLWithString:[NSString stringWithFormat"%@?email=%@&message=", FeedbackURL, email, message]];NSURLRequest *request = [NSURLRequest requestWithURL:url];[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { NSString *title = (!error)? @"Message Sent" : @"Error"; NSString *message = (!error)? @"Thank you for your Feedback, we hope it will help us to make this product even better." : @"There was an connection error. Please make sure you have internet connection and try again later."; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle"Close" otherButtonTitles:nil, nil]; [alert show]; NSLog(@"Error: %@", error.localizedDescription);}];if (email && (email.length > 0)) { NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; [userDefaults setObject:email forKey:UserEmailKey]; [userDefaults synchronize];}\[/code\]