php - Save PDF by name from Database -


i saving records pdf want them saved using name_empnumber abc_123

i using code below , library tcfpdf

if (isset($_post['submit'])){     require_once 'includes/practice.php'; //practice.php using library tcfpdf  $pdf->setfont('times', '', 15);  $tb1 = '</br></br>                                <b>2-  printer:</b><br /><br />                             <table cellspacing="0" cellpadding="0" border="1">                                   <tr style="background-color:#f7f7f7;color:#333; ">                                       <td width="300">sn</td>                                     <td width="300">type</td>                                  </tr>                              </table>';  $result= mysql_query("select * accessories emp_number='".$emp_number."' && is_accessory='printer'");   while($row = mysql_fetch_assoc($result)){ $tb2 = '<table cellspacing="0" cellpadding="2" border="1">                  <tr>                                   <td width="300">'.$row['serial'].'</td>                                 <td width="300">'.$row['model'].'</td>                         </tr>             </table>';              $tb1 = $tb1.$tb2;         }    $pdf->writehtml($tb1, true, false, false, false, '');        ob_end_clean();       $pdf->output('report.pdf', 'd'); } 

see saving report.pdf.

i want save name_empnumber.pdf abc-123.pdf


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -