Hey everyone ...
I have a button on my page:
[code=html]
<input name="button" type="button" class="style3" onclick="window .print()" value="Print Coupon" />
[/code]
that uses window.print() to print a coupon. I would like to add a function to the code that updates a field in a database that tracks how many coupons are printed. Is there a way to add this function:
[code=php]
$CouponNo = $CouponNo + 1;
mysql_query("UP DATE tbl_depts SET CouponNo = $CouponNo WHERE `key` = $spec");
[/code]
to that button?
Thanks for any help
Robert
I have a button on my page:
[code=html]
<input name="button" type="button" class="style3" onclick="window .print()" value="Print Coupon" />
[/code]
that uses window.print() to print a coupon. I would like to add a function to the code that updates a field in a database that tracks how many coupons are printed. Is there a way to add this function:
[code=php]
$CouponNo = $CouponNo + 1;
mysql_query("UP DATE tbl_depts SET CouponNo = $CouponNo WHERE `key` = $spec");
[/code]
to that button?
Thanks for any help
Robert
Comment