title: opening a pdf report in a new page
body: <p>The following gives a php script(report.php) that generates a pdf report when a button is clicked! unfortunately the pdf opens on the same page i want to get the pdf opened on a new page! how can i achieve this?</p>
  
  <pre><code>&lt;?php
  require_once("includes/db.php"); // provides db connection
  
  require("fpdf/fpdf.php");
  
  }
  
  $sql="SELECT count(Email) as Number, Date from reportorder";
  $result=mysqli_query($db,$sql);
  $pdf=new PDF();
  $pdf-&gt;AddPage();
  $pdf-&gt;AliasNbPages();
  $pdf-&gt;SetFont('Arial','B',12);
  
  $pdf-&gt;Cell(90,10,'Date',1,0,'C',0);
  $pdf-&gt;Cell(90,10,'Number of orders',1,1,'C',0);
  
  
  while($row=mysqli_fetch_array($result))
  {
  
    // cell with left and right borders
  
  $pdf-&gt;Cell(90,10,$row['Date'],1,0,'C',0); // 1,0 
  $pdf-&gt;Cell(90,10,$row['Number'] ,1,1,'C',0);
  
  
  }
  
  $pdf-&gt;output();
  
  ?&gt;
  </code></pre>
  
  <p>The button part is in a page which is loaded inside an iframe</p>
  
  <pre><code>&lt;a href='report.php'&gt;
  
      &lt;input class='button1' type='button' value='View report' &gt;
      &lt;/a&gt;
  </code></pre>