title: Generating Blank Page FPDF
body: <blockquote>
    <p>This is my billingpdf.php, If I click on the submit button it just keeps on generating a blank page. when i tried to remove and put some basic codes on billingpdf.php It works the pdf has been created and it shows the message that i input but when i tried using the submit button it seems that it doesn't generate pdf anymore. Anyone whose expert at FPDF?</p>
  </blockquote>
  
  <pre><code>&lt;?php
      session_start();
      if (!isset($_SESSION["uemail"])){
          header('Location: login.php');  }
          $uid = $_SESSION['UserID'];
      ?&gt;
      &lt;?php
      if(isset($_POST['submit']))
      {
      require("fpdf.php");
      require ("../util/dbConnection.php");
      $pdf = new FPDF();
      $pdf-&gt;AddPage();
      $pdf-&gt;SetFont('Arial', '', 10);
      $pdf-&gt;Cell(18, 10, '', 0);
      $pdf-&gt;Cell(150, 10, 'Testing"', 0);
      $pdf-&gt;SetFont('Arial', '', 9);
      $pdf-&gt;Cell(50, 10, 'Date: '.date('d-m-Y').'', 0);
      $pdf-&gt;Ln(15);
      $pdf-&gt;SetFont('Arial', 'B', 11);
      $pdf-&gt;Cell(70, 8, '', 0);
      $pdf-&gt;Cell(100, 8, 'Billing Assessment', 0);
      $pdf-&gt;Ln(23);
      $pdf-&gt;SetFont('Arial', 'B', 8);
      $pdf-&gt;Cell(20, 8, 'Expense ID', 0);
      $pdf-&gt;Cell(30, 8, 'Request Booking', 0);
      $pdf-&gt;Cell(20, 8, 'Request Date', 0);
      $pdf-&gt;Cell(20, 8, 'Due date', 0);
      $pdf-&gt;Cell(25, 8, 'Amount', 0);
      $pdf-&gt;Ln(8);
      $pdf-&gt;SetFont('Arial', '', 8);
      $sql = "SELECT ExpenseID, reqbookID, RequestBooking, requestDate, amount, 
                               DATE_ADD(requestDate,INTERVAL 30 DAY) as duedate 
                               FROM tblbilling NATURAL JOIN tblbookreq  
                               WHERE UserID = $uid ORDER BY requestDate";
      $result = $conn-&gt;query($sql);
      while ($row = $result-&gt;fetch_assoc()){
          $pdf-&gt;Cell(20, 8, $row['ExpenseID"'], 0);
      $pdf-&gt;Cell(30, 8, $row['RequestBooking'], 0);
      $pdf-&gt;Cell(20, 8, $row['requestDate'], 0);
      $pdf-&gt;Cell(20, 8, $row['duedate'], 0);
      $pdf-&gt;Cell(25, 8, $row['amount'], 0);
  
      }
      $pdf-&gt;Output();
      }
      ?&gt;
  </code></pre>
  
  <blockquote>
    <p>And this is my billing.php</p>
  </blockquote>
  
  <pre><code>&lt;h2&gt;Services and Charges&lt;/h2&gt;
  
          &lt;div class="content" style="border:1px dotted black; padding:1%; border-radius:1em; "&gt;  
  
  
  
              &lt;select style="margin-bottom:1%;"&gt;
                  &lt;option&gt; --- &lt;/option&gt;
                  &lt;option&gt;Weekly&lt;/option&gt;
                  &lt;option&gt;Monthly&lt;/option&gt;
              &lt;/select&gt;
              &lt;select style="margin-bottom:1%;"&gt;
                  &lt;option&gt; --- &lt;/option&gt;
                  &lt;option&gt;Laundry&lt;/option&gt;
                  &lt;option&gt;Cafe&lt;/option&gt;
                  &lt;option&gt;Maintenance&lt;/option&gt;
              &lt;/select&gt;
  
              &lt;input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for Expenses..."&gt;
  
              &lt;table id="myTable" cellpadding=10&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                        &lt;th&gt;Expense ID&lt;/th&gt;
                        &lt;th&gt;Expense Name&lt;/th&gt;
                        &lt;th&gt;Date Requested&lt;/th&gt;
                        &lt;th&gt;Date Due&lt;/th&gt;
                        &lt;th&gt;Amount&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;input type="submit" value="Print"style="float:right;" &gt;&lt;/input&gt;
                  &lt;tbody&gt;
                  &lt;/form&gt; 
                      &lt;?php 
                          include "../util/dbConnection.php";
                          $sql = "SELECT ExpenseID, reqbookID, RequestBooking, requestDate, amount, DATE_ADD(requestDate,INTERVAL 30 DAY) as duedate FROM tblbilling NATURAL JOIN tblbookreq  WHERE UserID = $uid ORDER BY requestDate";
                          $result = $conn-&gt;query($sql);
  
                          while ($row = $result-&gt;fetch_assoc()){
                              echo "&lt;tr&gt;
                              &lt;td&gt;".$row["ExpenseID"]."&lt;/td&gt;
                              &lt;td&gt;".$row["RequestBooking"]."&lt;/td&gt;
                              &lt;td&gt;".$row["requestDate"]."&lt;/td&gt;
                              &lt;td&gt;".$row["duedate"]."&lt;/td&gt;
                              &lt;td&gt;".$row["amount"]."&lt;/td&gt;
                              &lt;/tr&gt;";
                          }
                      ?&gt;
  
                  &lt;/tbody&gt;
  
              &lt;/table&gt;
  
  
          &lt;/div&gt;
  </code></pre>