Note that there are some explanatory texts on larger screens.

plurals
  1. POPrint php table with Print function via Printer
    primarykey
    data
    text
    <p>I have the following php table, how do i add print functionality just to the php table? And a button that when clicked, the following table is printed via printer, I tried 'CTRL+P' and I only got the html secton of the page example the header, footer, navigation bar, and not the results php results</p> <pre><code>&lt;?php echo "&lt;table border='1' id= results&gt; &lt;tr&gt; &lt;th&gt;FILEID&lt;/th&gt; &lt;th&gt;Firstname&lt;/th&gt; &lt;th&gt;Lastname&lt;/th&gt; &lt;th&gt;Issue Date&lt;/th&gt; &lt;th&gt;Interest Rate&lt;/th&gt; &lt;th&gt;Terms&lt;/th&gt; &lt;th&gt;Balance Outstanding&lt;/th&gt; &lt;th&gt;Balance Outstanding&lt;/th&gt; &lt;th&gt;New Loan&lt;/th&gt; &lt;th&gt;Principal Repayment for $l_month&lt;/th&gt; &lt;th&gt;Principal Repaid&lt;/th&gt; &lt;th&gt;Balance Outstanding&lt;/th&gt; &lt;th&gt;Interest Payment for $l_month &lt;/th&gt; &lt;th&gt;INTEREST ACCUMULATED DURING FINNANCIAL YEAR&lt;/th&gt; &lt;/tr&gt;"; while($row = mysql_fetch_array($result)) { echo "&lt;tr&gt;"; echo "&lt;td&gt;" . $row['app_file_id'] . "&lt;/td&gt;"; echo"&lt;td&gt;". $row['app_fname']."&lt;/td&gt;"; echo"&lt;td&gt;". $row['app_lname']."&lt;/td&gt;"; echo"&lt;td&gt;". $row['commit_date'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['computer_interest'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['loan_life'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['avg(app_ln_amnt)'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['Balance Outstanding'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['New Loan'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['SUM(r.receipt_on_principal)'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['Principal Repaid'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['avg(app_amnt_owed)'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['SUM(r.receipt_on_interest)'] ."&lt;/td&gt;"; echo"&lt;td&gt;". $row['Interest Accumilated'] ."&lt;/td&gt;"; echo "&lt;/tr&gt;"; } echo "&lt;/table&gt;"; ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload