2xldesign Posted April 17, 2008 Share Posted April 17, 2008 I am trying to make a multi page form which has a file upload on the 1st page. I have tried sessions but they do not seem to work with file uploads. I hope someone can point me in the right direction. Here is what I need to accomplish: (Short Version) form1:upload file & text input form2:text input form3: insert form1 & 2 into same row in database I have used sessions and the text input works no problem. I can get the file to upload / download if the form action is the next page. When I try and put a page in between it does not work. Unfortunately the client wants the upload on form1. Not sure how to accomplish this..... Thank you, Scott Link to comment https://forums.phpfreaks.com/topic/101495-file-upload-passing-form-values/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 17, 2008 Share Posted April 17, 2008 The uploaded file is destroyed when the form processing code ends. You must move/copy or otherwise save it before the script ends on the first page. Moving it into a session variable would work. Link to comment https://forums.phpfreaks.com/topic/101495-file-upload-passing-form-values/#findComment-519156 Share on other sites More sharing options...
shankar23 Posted April 17, 2008 Share Posted April 17, 2008 Hi Friend, You shall pass the values form 1 - form 2 as hidden values.so that in form 2 you will have (upload file,text input) as hidden value.When you submit a form 2 in all the values (upload file,text input1 & text input 2 ) are passed into form 3 there you can insert them into database using implode function to store the values in same field of the database. thanks Shang... Link to comment https://forums.phpfreaks.com/topic/101495-file-upload-passing-form-values/#findComment-519170 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.