By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,978 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,978 IT Pros & Developers. It's quick & easy.

Using files array in another page ?

100+
P: 150
in my site I'm having gallery page that you can upload your pictures in steps first step you upload the picture then go to another page, my problem is i want to use this file that have been uploaded in temp folder in the second page because in the finale step i will upload it in database ,how can i do that?
Jun 19 '08 #1
Share this Question
Share on Google+
6 Replies


Markus
Expert 5K+
P: 6,050
I'm not sure you can pass around file data.

Why not just upload it in the first page, then pass the url with a session through the rest of the pages?
Jun 19 '08 #2

100+
P: 150
what if i saved the binary date of the file in the session for it and use it for another page is that ok or not?
Jun 19 '08 #3

P: 25
why don't you switch the steps? the steps:
1. user enter his info
2. user upload his photo
3. save all data to database

then you don't have to read $_FILES from previous page.
Jun 20 '08 #4

Atli
Expert 5K+
P: 5,058
Could you not simply upload the image to the database in step one?
Why wait till step three?
Jun 20 '08 #5

Markus
Expert 5K+
P: 6,050
Could you not simply upload the image to the database in step one?
Why wait till step three?
We think alike.
;]
Jun 21 '08 #6

pbmods
Expert 5K+
P: 5,821
Heya, Smartic.

An alternative would be to move the file to a secondary location on your server (you can't rely on its location in the temp directory, since it could be erased).

The only problem is that you then are going to want to have some sort of garbage collection routine (to remove "step 1" uploads that never made it to step 3).
Jun 22 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.