php multiple form action
I have the following problem.
I want to do the following:
A form has text boxes to capture client information and upon clicking the submit button of that form an email will be sent to the client containing all the information that the client entered and then a PDF will be generated and be saved into a pre-specified local folder.
I have done the emailing part (very easy) but I couldn't install pdflib in my server so I have chosen FPDF (a php class) to generate PDF. Now I am unable to make FPDF to save the PDF into a specific directory in my local machine.
So if anyone knows how please let me know.
Next is, I can't handle 2 actions from a single form (sending email and generating PDF) I have the code for generating email in the same file as the form in a <?php ?> block. And the PDF generation is in another .php file.
So I need to call the generatePDF.php file from my form action but I also need the form action to have <?php print $PHP_SELF ?> so that the script calls itself and the email is sent.
I have tried header redirection but it doesn't work.
I am very novice in this...please help me.
Thank you in advance.