November 7th, 2012, 02:27 PM
Send a form variable to php and back
Hi! I want to send a variable from a html input to a php-document. The problem is that this php-document has to be on a remote server (not on the same domain). I have understood that i then need to use json or something. Can anyone point me in the right direction of how to do that? To be more precise: I have a html input in index.html on mydomain.com. I want to send the input to a test.php on thatdomain.com. Then i want to return a variable from test.php back to index.html to be used for something else. How?
November 7th, 2012, 02:58 PM
You can't do AJAX to another domain. So do an AJAX request to something on your own site which then send the request (and returns the response from) that other site.