Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
733 views
in Technique[技术] by (71.8m points)

file - Passing $_FILES or $_POST to a new page with PHP

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

put it in session variable...

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

Read this This also..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
...