I have a ajax function that is passing a string of variables to my script but I have one variable that needs to contain a full url with parameters.
What happens is that var1 and var2 become $_POST variables but I need to save the whole url variable as a string.
var url = "http://domain.com/index.php?var1=blah&var2=blah";
var dataArray = "rooftop_id=" +rooftop_id+ "&url=" +url;
$.ajax({
type: "POST",
url: "/scripts/error_check.php",
data: dataArray,
dataType: 'json'
});
I would like my $_POST variable to look like this:
$_POST['rooftop_id'] would be '1234'
$_POST['url'] would be 'http://domain.com/index.php?var1=blah&var2=blah'
Thanks in advance!