Jump to content

printing and preview of form


jaiffed

Recommended Posts

hello:

 

I am newbie in PHP and currently i am working on a project,

and i haven't know anything about how to print and preview of form...

plz help me send me some script which is preview and then print the form in php....

I want that when user submit the form then the preview page open with print button and ....

after that user click on print button then form print through the printer...

 

 

Link to comment
https://forums.phpfreaks.com/topic/191878-printing-and-preview-of-form/
Share on other sites

One way U can achive it is by creating form with two submit buttons

and then look which submit button was clciked

 

 

index.php

<form method='post' action='submit.php'>
//some field here
<input type='submit' name='submit' value='preview'>
<input type='submit' name='submit' value='post'>
</form>

 

submit.php

<?php
if($_POST['submit'] == "preview")
{
//echo everything as it will look in pages
}
else if($_POST['submit'] == "post")
{
//save data to database
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.