Hi guys,
I have a php form, that is working. With that form I connect to a DB, where i get data out. :-) When I use the form from my Mac/laptop, i can enter the sata and I get the result.
When i try to connect with this code under here. I can pass the form, and establich connection to DB, but my query, where I put country in, is empty. So I assume that is is not sent or attched to the url.
What could be the problem?
This is the code:
// NSString *myRequestString = [[NSString alloc] initWithFormat:@"&country=Germany"];
// NSData *myRequestData = [ NSData dataWithBytes: [ myRequestString UTF8String ] length: [ myRequestString length]];
// NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: [ NSURL URLWithString: @"THE URL" ]];
// [ request setHTTPMethod: @"GET" ];
// [ request setHTTPBody: myRequestData ];
The form:
<html><body>
<form action="connect.php" method="GET">
Country: <input name="country" type="text" />
<input type="submit" />
</form>
</body></html>
To finish of.. The form works, but I cannot send data from my iPhone APP :-(
Hope u can point me in the right direction.