how to send a POST value to a server with a PHP script waiting for it from iPhone app
- by Sam Jarman
Hi
In my iPhone app - I am trying to get what the user types in a box emailed to me. I am going to use a PHP script sitting on my server, and try send the data to it for it to be processed.
Promblem is... how do i do this?
Im using the ASIHTTPRequest wrapper and have some code like this
ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
[request setPostValue:@"[email protected]" forKey:@"address"];
[request setPostValue:@"mymessagehere" forKey:@"message"];
and have this simple php script which i plan to use here http://www.w3schools.com/PHP/php_mail.asp
How do I go about joining these up?
Any tutorial links/blog post/ideas appreciated