i'm using ajax call on the php page(my.php) to pass JS variables and JS array to another php page(destiny.php). Now in destiny.php i do some DB operations.
$.ajax({        
    type: "POST",
    url: "destiny.php",
    data: { b_Array : b_arr, b_value : b_val},
    success: function(data) {
        window.alert(data);
    }
But sometimes due to user inputted error (through Js variables or Js array), i have to show an alert (right now using above code window.alert(data) to show alert) But it doesn't refresh the page. 
how can i refresh the page then? i tried header(). but still it doesn't work.
 
     
     
     
     
     
     
     
     
    