shoopaie Posted March 3, 2011 Report Share Posted March 3, 2011 (edited) To make this as basic and understandable as I can, how do i take a handful of variables (created FROM a form) and send them to another file that has collected other variables from a second form, so that I can email them all at the same time, instead of two different emails. So basically is i have $fn, $ln, $phone, $email, stored from one form, and $ftp_un, $ftp_pw, etc from another form, how do i collect them all into one file to be processed? Thanks for the help. I am thinking in my head there should be a way to take the variables from form1.html, and form2.html, and have them all processed in form_process.php, then on to be emailed. I remember studying some "constants" and "global variables" but nothing that is ringing a bell. Is constants, or global variables, or custom functions accessible to a file that isn't their source file? I cannot include the file or else i include alot of extra fluff... Edited March 3, 2011 by Adam Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 4, 2011 Report Share Posted March 4, 2011 I think you have two ways to approach this: -- User enters data in the first form. Form submits, PHP is used to process the data (using $_POST[]) and it is stored in hidden inputs within a second form. User submits the second form, and then PHP is used to retrieve the from data, which includes hidden fields from form #1 and visible form fields from form #2. -- You could also use sessions, and save form fields within variables in the session like Rudyten said above. Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.