How do I print information when the user send the information
when user open the page, it displays a form just like any other form, when the user finishes the information gets saved in the DB, but at the same time I would like to print that information on paper...
<form method="post" action="save.php">
<input name="name">
<!-- like 30 more inputs, i know is crazy -->
<button type="submit">Send</button>
</form>
<?php
if(isset($_POST['_token']) && $c->validToken()) {
// Get all inputs, re-validate, clean...etc
// Save info into the DB
// Done!
// Here is where I would like to collect all the infomarion
// and print it, send it to a printert...
header('Location: thankyou.php');
exit;
}
?>
I can use PHP, o jquery...
am I dreaming or this is possible?
Update
Yes there is a nice printer connected to the "server"(What kind of question is that?)...
Nop, I do not use ajax for this....
Nop, I have never use PHP to print, therefore this question.... I have use Java but the user always sees the printer dialog window, in this case the user don't need to see that.
There was 2 answers that pointed me to the right direction thank you, I have no idea who down-voted this question, but clearly must be a genius to find this question irrelevant or too dumb....