Jump to content

Need PHP help... have all the elements... just need help putting them together :


Recommended Posts

Hey Guys,

 

I was wondering if someone could help me. I am doing a website for a client which is about warranties and insurance. There is an enquiry form which the customer will fill in, and when they submit it, i need it to automatically send them a PDF to their email account. They have to receive this document for legal reasons.

 

I am a complete nooob with PHP, I created the form using a PHP form generator. I found this link for how to attach files to forms, but i have nooooo idea where to edit the PHP in the form files I have.

 

Here is the link i found to attach files to php forms as an auto response... http://www.webcheatsheet.com/php/send_email_text_html_attachment.php

 

and attached to this post are the form files I have used on my website..

 

If someone could please help I would be eternally grateful.

 

 

Thanks! Nikky

 

[attachment deleted by admin]

You are not understanding what you need to do. You need the form to post data to whatever code you write to handle it. You do not need the form to handle a file. What you need is use email to send the pdf file as an attachment.

 

display form on web page

recieve form data to a php file

do something with form data in the php file

send PDf as attachment in the php file

 

Kind of simplified but maybe you can understand the flow of what you need to do.

 

 

HTH

Teamatomic

Hey,

 

Thanks for the replies.

 

As far as I understand it I need to add a bit of code to my PHP files so that when someone hits the submit form button, the pdf file is sent to their email address.

 

I looked at my php code, and that tutorial I posted on how to add the code to mail out the PDF file, but PHP doesn't make a whole lot of sense to me yet and I couldn't figure out what code I needed to edit.

 

Its always the same PDF document that gets sent, so I don't need anything to be created, just the same file sent to the email address supplied by the customer every time the form is filled in and submitted.

 

I'm confusing myself now! lol

 

The required functions can be found here http://php.net/manual/en/book.pdf.php It is however required to have the PDFlib library loaded. If you don't have the library and can't install it then FPDF may be of some help as this library does not need the PDFlib

 

FPDF: http://www.fpdf.org/

 

Alternatively you can use Zend_Pdf which is a component of an increasingly popular framework

 

http://framework.zend.com/manual/en/zend.pdf.html

 

I highly recommend Zend_PDF

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.