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: 
Why would you need to use PHP at all? You can make editable pdf forms. I've downloaded the attached form and, unfortunately, this is not already editable but reconverting them to editable PDF is easy. The most common solution to convert standard pdf to editable pdf forms is acrobat: the guide to do so is [here](http://www.adobe.com/content/dam/Adobe/en/products/acrobat/pdfs/adobe-acrobat-xi-convert-forms-into-fillable-pdf-tutorial_ue.pdf). However, you may find some free or ad-supported services which allow you to do the same thing on the internet. With some googling I've found [pdfescape.com](http://www.pdfescape.com/). Try to create a new document in pdfescape.com and, under the "insert" menu, choose "Form Field". That's it: you've just added an editable field to your page. Now click the "Save and Download" icon.

Once you've done with converting your pdf document from static to editable, you can distribute the pdfs to the agents and they can compile and save the form with free programs. On Mac OSX I can do that with the default image viewer. On Windows you'd probably need Acrobat. Still, they'll be able to download the pdf, compile the form, save and submit back the compiled form.

---

If you really want to do this with PHP, have a look at the documentation and try to figure out yourself how much time such a task would require, considering you should tell PHP where exactly to write text (in pixels) on the form and handling all exceptions (such as too long text) yourself. [Here](http://php.net/manual/en/book.pdf.php).

Also, doing that in PHP would require you to [parse the pdf file into php](https://stackoverflow.com/questions/1251956/is-there-a-pdf-parser-for-php) and THEN create a new pdf out of it. Good luck doing that!
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;
}

```

?>