2

I am currently building a new part of an existing script for a client. Currently after a users fills in some account creation info they are directed to a page where they can upload a file and send it, sort of like a file sharing network. The passing of the $_POST variables that are sent / created isn't the issue, what I am trying to do is allow them to create an account and upload a file all from one form. So the process will be

fill in form goes to createaccount.php create account, get new accountID attach to other info from original post send to the upload page to upload file automatically then to their home page

The main question is how can I pass the $_FILE that they originally uploaded along with all of this? I need to pass it along so I don't have to rewrite the uploading script.

Any suggestions?

Thanks

Webtect
  • 819
  • 2
  • 10
  • 31

1 Answers1

3

put it in session variable...

$_SESSION['file']=$_FILE['....']

Read this This also..

Rajat Singhal
  • 11,234
  • 5
  • 38
  • 56
  • It has to be passed as a post variable for the current class to take it. Is there a way to put the $_FILES in a form and submit it. I can submit it automatically with JQuery but how do I put the $_FILES back in the form? – Webtect Jan 04 '12 at 20:16
  • That is not possible...see this question..http://stackoverflow.com/questions/1796628/php-files-file-loop-upload – Rajat Singhal Jan 05 '12 at 04:18