I have created these 2 pages to generate reports.
teller_reports.php
<form id="form1" name="form1" method="post" action="daily_transactions_report.php">
<label>DailyTransaction Reports<br />
<br />
DATE </label>
<input type="text" id="demo3" name="date" maxlength="25" size="25"/>
<img src="../images/cal.gif" onclick="javascript:NewCssCal('demo3','yyyyMMdd')" style="cursor:pointer"/>
<p>
<label></label>
<label>
<a href="tcpdf/examples/daily_transactions_report.php">
<input type="submit" name="button" id="button" value="Generate" />
</a>
</label>
</p>
</form>
daily_transactions.php
<?php
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// extend TCPF with custom functions
class MYPDF extends TCPDF {
public function myconnection(){
$this->con = mysql_connect("localhost","root","");
mysql_select_db("bank", $this->con);
$date='';
$date = var_dump($_POST['date']);
$this->result = mysql_query("SELECT * FROM transaction WHERE transaction_date = '".$date."' ORDER BY tran_id");
It gives me an error like this.
Notice: Undefined index: date in C:\wamp\www\MySite\php files\tcpdf\examples\daily_transactions_report.php on line 16
line 16 is;
$date = var_dump($_POST['date']);