Click to See Complete Forum and Search --> : Creating Forms with Multiple Actions


dmichael
11-01-2004, 09:23 PM
Back in September, another member (speedwell) wrote: "Could you give an example of an "Action" document that sends the data to an e-mail address and to a URL?" This is essentially what I'm also trying to find out about. I would like to have the user Submit a form and have the data 1)Emailed to me, and 2)Sent to the next page to be retrieved (using PHP) and displayed. The data will eventually end up on a shopping cart page down the line, so it needs to be passed to subsequent pages. But back to the question: HOW CAN I CODE FOR THIS? DOES THE USER NEED TO SOMEHOW SUBMIT THE FORM TWICE USING 2 DIFFERENT SUBMIT BUTTONS? Some acutal code illustrating an example would be very helpful, as well as an explanation. Thanks.

Paul Jr
11-01-2004, 09:25 PM
How about sessions? The info is mailed on the processing page, sessions are created containing the inputted information, you redirect to the next page, and the information is then retrieved via said sessions on that page and subsequent pages.
Or, you could use CURL (http://www.php.net/curl) (which I've never actually been able to figure out the one time I tried it).