rohit mishra rohit mishra - 1 year ago 103
SQL Question

storing fpdf output in server and add filename in database

I am generating invoices using fpdf library which fetches data from database,now when the pdf is generated i want to save the file in a folder and add the file name with date in database so that i can fetch the all invoices generated previously in a table.Please help me out here.

Answer Source

Be shure that you can write to the directory.


Save the Pdf.


Update the Sql Tables

$query=" UPDATE `shopdb`.`bills` SET `bill_doc_crea` = '1', `bill_pdf_doc` = '".$filename."' WHERE `bills`.`ordernummer` ='".$orderId."' ;";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download