Hello i am trying to generate mysql reports. I have them working but my problem is: i want to happen is when u click an option value e.g. list customer details, i want it to generate the report automatically.
Here is my code below it is all correct i just dont know how to implement my option code into mysql and php code
// option code
<form name="formName" action="phpReportGen.php" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<p>Please select one of the options<br>
<select name="select">
<option value="Option 1" selected>List of all customers</option>
<option value="Option 2">List of all customers in Cork</option>
<option value="Option 3">List of customers who order Doors in last 6 months</option>
<option value="Option 4">List of all customers in Kerry</option>
</select>
</p>
//phpReportGen.php
<?php include 'config.php'; ?>
<?php
include_once("report.php");
$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";
$res = mysql_query("SELECT * FROM customers");
$prg->mysql_resource = $res;
//$prg->title = "Test Table";
$prg->generateReport();
?>