nikky_d16 Posted January 11, 2010 Share Posted January 11, 2010 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] Quote Link to comment https://forums.phpfreaks.com/topic/187992-need-php-help-have-all-the-elements-just-need-help-putting-them-together/ Share on other sites More sharing options...
jeremy0 Posted January 11, 2010 Share Posted January 11, 2010 all i can say is, take a crash-course in php. http://www.w3schools.com/PHP/php_intro.asp good luck., Quote Link to comment https://forums.phpfreaks.com/topic/187992-need-php-help-have-all-the-elements-just-need-help-putting-them-together/#findComment-992538 Share on other sites More sharing options...
teamatomic Posted January 11, 2010 Share Posted January 11, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/187992-need-php-help-have-all-the-elements-just-need-help-putting-them-together/#findComment-992557 Share on other sites More sharing options...
nikky_d16 Posted January 11, 2010 Author Share Posted January 11, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/187992-need-php-help-have-all-the-elements-just-need-help-putting-them-together/#findComment-992561 Share on other sites More sharing options...
ignace Posted January 11, 2010 Share Posted January 11, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/187992-need-php-help-have-all-the-elements-just-need-help-putting-them-together/#findComment-992915 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.