I send Ajax request using GET. One of the parameters (to) is lost and cannot be retrieved on the called file using $_GET[“to”].
Now what is the problem ? Some of file working well with this function !
function SendEmail(To, Subject, Message)
{
var URL = 'mail-service.php?&msg=' + escape(Message) + 'to=' + escape(To) + '&subject=' + escape(Subject);
$.ajax({
url: URL,
type: 'GET',
success: function (res) {
alert("Message Sent to : " + res);
}
});
}
check yout ajax url get parameter I think you forget adding
&