I just had a quick look on your code .. the things I can suggest you are
- Try to sanitise the _POST values ( apostrophes or any other illegal characters)
- Try to print Mysql_error(); and let us know what error message you get, if any.
- Try to print the value of $sql1, and check it.
- Also in the Insert query use mysql_real_escape_string();
I hope this helps.
Update
And oh I missed the PDF bit .. as per @klochner answer you can store pdf's file path in the mysql table, and just save the files on to the disk.
The thing you can try is that have mysql table and save all of the values and generate pdfs on demand.