I have a simple ajax request to change the value of some php session variable I still get object object error no matter how I changed the code :
JS code:
$(document).ready(function(){
$('#facebook_img').live('click',function(){
login_condetion=1;
$.ajax({
type: "POST",
url: 'facebook_login_condition_variable.php',
data:{login_condetion:login_condetion},
success: function()
{
alert('test');
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest);
alert(textStatus);
alert(errorThrown);
alert(XMLHttpRequest.responseText);
}
});
});
});
facebook_login_condition_variable.php :
<?php
$temp = $_POST['login_condetion'];
if(!empty($temp) && $temp != 0)
{
$_SESSION['do_not_allow_auto_facebook_login'] = 1;
}
else
{
$_SESSION['do_not_allow_auto_facebook_login'] = 0;
}
?>
I tried a lot of ajax form but same error and I get nothing when I alert responseText
I do not understand why I still get that error ? I hope to find some help here thank u