PHP重定向到pdf然后导航到另一个页面?

I am using php and an apache server. My application gathers data from the user, put's it in a database, then uses PDFLib to display the formatted data back to the user as a pdf. My problem is, I would like the pdf to display as a new page, this works. But, I also have a blank page left up with the URL containing the variables used to display the pdf. I would like this page to show a different summary page, in HTML, without the variables in the URL, but I don't know how to do that. In the code that follows, I am going to the summary page if the medical flag is false. What I would like is to go to BOTH pages if the medical flag is true. Is this possible?

    if($medical_flag)  {
        header("Location: {$_SERVER['PHP_SELF']}/./index.php?step=wc_pdf&id={$event_id}");      
    } else {
        header("Location: {$_SERVER['PHP_SELF']}?step=success&id={$event_id}");
    }
    exit;

OK, I understand how this is impossible, but I still haven't figured out how to solve the problem. I thought I could toss the opening of the PDF back at jQuery with something like this:

jQuery(document).ready(function ()
{
function display_pdf_page(data, textStatus) {
    var current_record = data || {};
      //somehow display the pdf now         
}

function show_pdf(eventid){
    jQuery.getJSON(
        './inc/get_current_record_data_json.php',
        {'id': eventid},
        display_pdf_page           
    );      
} 
    ...
    });

Then after I process the data in php "call" the above using:

   echo '<script type="text/javascript">'
        , 'show_pdf($event_id);'
        , '</script>';  

But that doesn't work either, php doesn't know where to find show_pdf. My lack of understanding of client/server side events is killing me here. Call be obtuse... I don't get it.

This solution will not work as designed.

First, if you want to hide the data, you should switch to POST rather than GET. This way, the data is included in the HTTP payload instead of the URI.

Secondly, you should either include a hidden iframe for javascript to access the page for which generate the PDF. On successful execution of the AJAX call (or whatever method you use), you can then redirect the page to your desired destination.

As suggested by sixeightzero, POST should be used instead of GET in such cases.

However, maybe you could accomplish the desired effect with a big iframe spaning the window (100% width and height)?