So I am grabbing data through AJAX in order to redirect the user to a page , but the PHP session data gets lost after being redirected to the page ... Below is my code , can anyone tell me what might be causing that ... I'm copying the relevant code below
$("#activation").click(function(event){
event.preventDefault();
var first_name = $("#first_name").val();
var last_name = $("#last_name").val();
var customer_phone = $("#customer_phone").val();
var pin = $("#pin").val();
var carrier_id = $("#selCarrier option:selected").val();
var phone_number = ValidateMobNumber('customer_phone');
$.ajax({
url:"add_customer.php",
data:{first_name:first_name,last_name:last_name,pin:pin,carrier_id:carrier_id,customer_phone:customer_phone},
type:"POST",
success:function(result){
var customer_id = result;
var url ="http://www.example.com/store/activation.php?id="+customer_id;
if(customer_id !=""){
window.location.href = url;
return false;
}
else {
alert("Please enter a first name , last name and pin for activation");
}
}
});
});