I am trying to get my session in ajax.. for that i had written my code like this
BTLJ.ajax({
type: "POST",
url: btlOpt.BT_AJAX,
data: datasubmit,
success: function(html){
//if html contain "Registration failed" is register fail
BTLJ("#btl-register-in-process").hide();
if(html.indexOf('$error$')!= -1){
...
...
}
}else{
BTLJ(".btl-formregistration").children("div").hide();
BTLJ("#btl-success").html(html);
BTLJ("#btl-success").show();
alert(<?php session_start(); print_r($_SESSION); ?>);
setTimeout(function() { ); BTLJ(".kcregbox").show();},7000);
// BTLJ("#btl-success").hide();
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus + ': Ajax request failed');
}
});
but ajax is not working if i write like that.. please help me in getting my session in ajax. thanks in advance.