I've been researching alot on using mysql databases data for an iphone app.
I was wondering how to send PHP $_GET, $_POST or $_REQUEST requests from the app?
But I don't really understand what URLRequest does extensively? From the name and reference Library it says it loads the URL and then you tell it what to do with the data it receives...
What I ultimately want to do is:
I send a request with a string/text argument "myArg", and on the server side it does a bunch of stuff (checks in the database for the existence of that argument) and returns TRUE or FALSE...
$_GET in php are just simple get parameter for the HTTP protocol.
The get parameters are the easiest to use, you are already using them: www.mypage.com/myscript.php?mynumber=99&myname=codezy
The parts of the URL I made bold are get parameter.
Post is bit more difficult, but you can use bigger chucks of data in post them in get.
When you want to use post is would suggest use ASIHttpRequest's ASIFormDataRequest.
About handeling the recieved data, it in the urlData part of your example.
Just do:
$_GET in php are just simple get parameter for the HTTP protocol.
The get parameters are the easiest to use, you are already using them: www.mypage.com/myscript.php?mynumber=99&myname=codezy
The parts of the URL I made bold are get parameter.
Post is bit more difficult, but you can use bigger chucks of data in post them in get.
When you want to use post is would suggest use ASIHttpRequest's ASIFormDataRequest.
About handeling the recieved data, it in the urlData part of your example.
Just do:
Thanks alot for the info. COncerning ASIHttpRequest, is it recognized by Apple? Basicaly if I want to add an app to the app store will it be accepted (any idea..?) if it contains this API?