I need to pass a set of values in a form such as name, lastname, age, etc. to a PHP file in a different subdomain.
For example, form.html is located at http://subdomain1.website.com/form.html
, when I press the submit button it passes the data in the form to http://subdomain2.website.com/doform.php
and inserts it into the database.
How do I pass this data?
I've tried:
$.post('http://subdomain2.website.com/doform.php', {key : 'fdsjfojdsfmkldskfoidsjk'}, function(data){
alert(data);
});
It fails with permission denied
. Can I fix this?