Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 8th, 2010, 10:10 AM
Authorized User
Join Date: Jun 2009
Posts: 66
Thanks: 22
Thanked 0 Times in 0 Posts
Default php multiple form action

Dear all,
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.


Similar Threads
Thread Thread Starter Forum Replies Last Post
using <form action RinoDM Javascript 4 February 20th, 2009 04:31 PM
form action attribute austinf HTML Code Clinic 2 August 2nd, 2006 08:30 AM
Two action in a form johnjohn Classic ASP Components 1 November 16th, 2004 05:45 PM
multiple form action jack1234 JSP Basics 1 June 8th, 2003 01:42 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.