adam.sitingduck Posted February 15, 2011 Share Posted February 15, 2011 I want to make a form in which I have normal text input fields as well as a file upload on the same form.I know I need to make the enctype="multipart/form-data" to make file upload work but will I be able to have text input fields on the same form? When the form is submitted I want the data in the text fields to form the body of an email and then have the files become attachments.One solution I can think of is to make it a three-step process step one have a form where the user inputs the text fields. Step two the data collected gets stored in $_SESSION values and the file upload form is displayed. Step three all collected data is displayed for review and then when submitted is sent as an email.If possible I would like to have it on the same form thoughThanks Link to comment Share on other sites More sharing options...
birbal Posted February 15, 2011 Share Posted February 15, 2011 you can make it in one form also..from the form you will get the text and as well as file. then you can process those to use in any case (in your case mailing). i am not sure what problem is there...did you try anything?..what problem are you facing? Link to comment Share on other sites More sharing options...
Ingolme Posted February 15, 2011 Share Posted February 15, 2011 The enctype attribute doesn't prevent you from using normal form inputs. The inputs will still be in the $_POST array. The files will be in the $_FILES array. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.