generate report in php

clags

New Member
I want to generate a report dynamically using PHP and MYSQL.Please can anyone guide me on how to generate a report without using any tool. Please give an example.\[code\] Filename- Example.php <!DOCTYPE HTML> <html> <head> <title>PHP Report Generator</title> </head> <body> <?php include_once "config.php"; //include config file $prg = new phpReportGenerator(); $prg->width = "100%"; $prg->cellpad = "0"; $prg->cellspace = "0"; $prg->border = "1"; $prg->header_color = "#465584"; $prg->header_textcolor="#FFFFFF"; $prg->body_alignment = "left"; $prg->body_color = "#D1DCEB"; $prg->body_textcolor = "#000000"; $prg->surrounded = '1'; $prg->font_name = "Boishakhi"; mysql_connect("localhost","root","ims",""); $oMysqli = getConnection(); mysql_select_db("ims"); $res = mysql_query("select invType,invItemId,itemName FROM inventory_item WHERE invItemId='001'"); $prg->mysql_resource = $res; $prg->title = "Test Table"; $prg->generateReport(); ?> </body> </html>\[/code\]
 
Back
Top