如何设置 jQuery中的会话值和获取在PHP中的值?我们必须设置在jQuery的会议上,一些价值和PHP在jquery中设置session值并获得相同的值php
得到相同的会话值$.ajax({
url: base_url+"api/v1.0/ssoauthentication/submitOtp",
type: "POST",
datatype : "json",
data:'phone_number='+phone_number+'&country_code='+country_code+'&otp='+otp+'&device_type=1&device_token=sasasa&device_id=3',
success:function(data){
var data = jQuery.parseJSON(JSON.stringify(data));
if(data.status == false){
$('#loader').removeAttr("class")
$.each(data.data, function(key, value){
$('#'+key+'_error').html(value);
})
//find common error
if(typeof data.message != "undefined"){
var value = data.message;
$('#common_error').html(value);
}
}else{
alert(data.data['new_otp']);
//opt is need to save in session and i get otp new page in seesion
window.location = base_url+'web/view_sso_authentication/';
}
我已经使用ajax调用了php文件。该文件返回一些值。我需要在下一页中的值。我在会话中获得价值 –
请向我们显示您的代码 – Zl3n
作为获取参数传递 – JYoThI