Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 539
  • Last Modified:

PDF attachment thru mail using php

I have a pdf form, which users can fill online, now i want that when users click submit on the form it should send the pdf with the filled data as attachment.
Please guide on what php script to b written for this process.

thanks.
0
Desire2change
Asked:
Desire2change
  • 3
  • 2
1 Solution
 
EMB01Commented:
I'll need to see you PDF submission script. Then, we'll make that script write to a PDF file (if it doesn't already). And; finally, we'll send the PDF as an attachment via email.
0
 
Desire2changeAuthor Commented:
I don't have any pdf submission script, I just have a pdf form.
0
 
EMB01Commented:
Is there currently a submit button on the PDF form?
0
 
Desire2changeAuthor Commented:
actually , i have not yet prepared the form, i want an idea on how to move forward to it, my idea is there will b a pdf form, i will fill it, then click on submit button , then it should send that filled form as attachment to my mail
0
 
EMB01Commented:
I don't believe you can submit via a .PDF form. If you can do this; I'm not sure how to do it. However, I know how you can have users submit an online form, then generate a .PDF and send it via email as an attachment. To do this, please review these steps:

1. Create the form on a PHP page (we'll call this page A)
2. Submit data from form to another PHP page (we'll call this page B)
3. On page B, create a script at the top of the code that uses the POST data from the previous page
    - Make code secure with server-side input validation
    - Create .PDF document via PHP's PDF functions; or, check out the free FPDF PHP class here:
      http://www.developertutorials.com/tutorials/php/easy-pdf-generation-in-php-8-02-27/page1.html

Please let me know if you have any questions.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now