how to send a POST value to a server with a PHP script waiting for it from iPhone app

Posted by Sam Jarman on Stack Overflow See other posts from Stack Overflow or by Sam Jarman
Published on 2010-04-13T10:28:45Z Indexed on 2010/04/13 10:33 UTC
Read the original article Hit count: 248

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about php

Related posts about iphone-sdk