title: Call function to new window/tab then redirect to other function
body: <p>I am making a report with fpdf. My problem is I want to call the function that using fpdf class in new window after processing save to database, like this:
  I can figure like this
  1. First I have to save to the database, with the data posted form form html.
  2. Call fpdf function to print the result with the same data with the first process.
  3. redirect to index function to show that data has been saved into database.</p>
  
  <p>my code like this :</p>
  
  <pre><code>//save to database
  $this-&gt;My_model-&gt;insert($data);
  
  //call the pdf function
  $this-&gt;print_the_result($data);
  
  //redirect
  redirect('my_class/index');
  </code></pre>