Hi,
I have PHP script link, which responds YES or NO when we set post userName and emailID. I have used ASI framework.
When I try to connect with the following code, I get a null return.
NSURL *url = [NSURL URLWithString:@"https://abc.com/abctest/registration.php"];
ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url];
[request setPostValue:@"
[email protected]" forKey:@"email"];
[request setPostValue:@"pqr" forKey:@"userName"];
[request start];
NSError *error = [request error];
if (!error) {
NSString *response = [request responseString];
printf("\n\n\n Responce %s",[response UTF8String]);
response = [response stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if ([response isEqualToString:@"YES"])
{
printf("\n\n YES");
}
}
What am I doing wrong?