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 t
Use encodeURIComponent() on url variable:
var url = "http://domain.com/index.php?var1=blah&var2=blah"; var dataArray = "rooftop_id=1&url=" +encodeURIComponent(url); $.ajax({ type: "POST", url: "/scripts/error_check.php", data: dataArray, dataType: 'json' });