Question: So I am given a task to make this possible it if it. We have a website where there are forms available for grabs and print. Now the supervisor wants it if its possible that the agents when grabbing the form, doesn't need to print the form. But just fill up from there and submit the form thru PDF again with details already in it. Is this possible with PHP?. I am attaching on of the forms. 

<https://docs.google.com/file/d/0B3yAPZizyWCCYWkwWHdrdzBBdFU/edit?usp=sharing>

Answer: 
This is definitely possible. You'll have to be careful about the security (since you're passing tax ids), and you'll need to let the users know that they'll have to use Adobe Acrobat Reader to submit their completed form.

1. On the form itself use Adobe Acrobat Pro to create custom form fields.
2. Set the document to allow saving in Acrobat Reader
3. Create a button in Acrobat Pro on the document to submit the entire PDF as a PDF file to your server. [Here's a link explaining how.](https://stackoverflow.com/questions/4631008/can-a-pdf-fillable-form-post-itself-to-an-https-url)
4. On the server where you want the PDF to go, then you would install a trusted certificate from a CA. This should allow transmission through SSL from Acrobat.
5. Additionally once the user has completed their form you can supply a link where they can upload the form through SSL (if they don't want to use Acrobat to complete the fields). (An example might be someone printing out the file to sign it.)

You can also set the file up to send as an HTML post as well. You would need to work out the legal aspects of using a signature for this though.

Remember that e-mail is not secure, so having users submit a completed form through e-mail could compromise their identity.
1)if i open the pdf form in browser ,am not able to get the post of pdf form in my phpscript

2) if i open the form in adobe acrobat then am getting the post in $\_POST variable..
below is the my php script..

According to me $\_POST varibale is not working when opening the form in web browser..

```
<?php 
include "connection.php";
echo '<pre>'; print_r($_POST); echo '</pre>'; 

$sql = "INSERT INTO persons (name, city, state, country)VALUES('".$_POST["name"]."','".$_POST["city"]."','".$_POST["state"]."','".$_POST["country"]."')";

if($conn->query($sql) === TRUE) 
{
  echo "New record created successfully";
}else 
{
  echo "Error: " . $sql . "<br>" . $conn->error;
}

```

?>