I am using ajax to send data through an AJAX call to set.php:
$.ajax({
url: "ajax/set.php",
dataType: "html",
type: 'POST',
data: "data=" + data,
success: function (result) {
alert(result);
}
});
Before sending the AJAX call, I am using JavaScript to alert()
the data, the data is:
JeCH+2CJZvAbH51zhvgKfg==
But when I use $_POST["data"]
, the data is:
JeCH 2CJZvAbH51zhvgKfg==
Which displays pluses replaced with spaces, how can I solve this problem?