Here Below is my code
NSString *string = [NSString stringWithFormat:@\" http://abc.com /Demo/View.php?drinkId=%@&name=%@&comment=%@&date=%@&
NSURL will return nil for URLs that contain illegal chars, like spaces.
Before using your string with [NSURL URLWithString:]
make sure to escape all the disallowed chars by using [NSString stringByAddingPercentEscapesUsingEncoding:]
.
Here is the class reference for NSString.
Hi All Now My Problem Is solved here I did a mistake left a blank space before "http".
The correct code is
NSString *string = [NSString stringWithFormat:@"http://myserver.com/Demo/View.php?drinkId=%@&name=%@&comment=%@&date=%@&rating=%@&ReqestType=SubmitComment",DrinkId,Name,Comment,Date,Rating];
NSURL *url = [[NSURL alloc] initWithString:string];