如何設置 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