I have a simple post function (see bellow)
$("#abi_test").click(function (event) {
$.post(
"get.php",
{
name: "Tom",
age: "30",
email: "johnsmith@gmail.com",
uniID: "3"
},
function (data) {
$('#stage').html(data);
}
);
});
how can i change this to post to https://www.site.co.uk/some/get.php
?
I have tried
$("#abi_test").click(function (event) {
$.post(
"https://www.site.co.uk/some/get.php",
{
name: "Tom",
age: "30",
email: "johnsmith@gmail.com",
uniID: "3"
},
function (data) {
$('#stage').html(data);
}
);
});
But did not work
I am getting a error
XMLHttpRequest cannot load https://www.site.co.uk/some/get.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://website.org.uk' is therefore not allowed access.