I have two columns item name
and amount
. I just click the submit button and then I want to print the invoice. I already set the invoice format and I know onclick="window.print()
but in this case the page prints everything. I only want to print the invoice format after the submit button.
<form method="post">
item name
<input type="text" name="item">
amount
<input type="text" name="amt">
<input type="submit" name="submit">
</form>
<?php
if(isset($_POST['submit'])){
$item = $_POST['item'] ;
$amt = $_POST['amt'] ;
// want print I have set the invoice
}
?>