hello i am creating chat widget which provide chat widget website. i have created it but i dont know in some website it is working but in some website it is not working at all. right now i am facing this issue Undefined index: data_type in C:\wamp\www\college\chat_service_providereceive_msg.php on line 69pt?. here is my code
$.ajax({
url: "http://127.0.0.1/college/chat_service_provider/receive_msg.php",
method: "POST",
data: {
data_type: 'userdata', //i have tried 'data_type'
email: a,
key: c
},
success: function(a) {
b = a;
alert(a);
}
})
andthe php code
echo $_POST["data_type"];
so in some website it is working properly and alert me userdata. but in some website it returning me Undefined index: data_type in C:\wamp\www\college\chat_service_providereceive_msg.php on line 69 so please help me to find this issue thank you. now got the answer. i have changed code.
$.post("http://127.0.0.1/college/chat_service_provider/receive_msg.php",
{
data_type: 'userdata',
email: a,
key: c
},
function(a) {
b = a;
alert(a);
})