Something i wanna know is ...When i send empty parameters to php using post method, it sending as (null). let me elaborate. this is php post method in my ios
NSString *urlString = [NSString stringWithFormat:@"http://localhost:8888/userinfo.php?name=%@&Email=%@&phone=%@",name,Email,phone];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString:urlString]];
[request setHTTPMethod:@"POST"];
In my app, user should not fill all parameters, user should fill only one. so,if user enters only phone and press send,remaining fields are getting stored as (null) in database instead of emptiness.
this is how my app executing php file, when null parameters sent
http://localhost:8888/userinfo.php?name=(null)&Email=(null)&phone=123445435"
what i want is
http://localhost:8888/userinfo.php?name=&Email=&phone=123445435"
is this possible?
stringByReplacingOccurrencesOfString:withString:(developer.apple.com/library/mac/documentation/Cocoa/Reference/…) onurlStringto remove all occurrences of(null)and replace with@"".