p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning PHP (http://p2p.wrox.com/forumdisplay.php?f=95)
-   -   File upload at a later point of time (http://p2p.wrox.com/showthread.php?t=35491)

juergreh November 27th, 2005 10:51 PM

File upload at a later point of time
hey there

anybody knows a solution to this.
i have a form in flash at in various screens i have the option to attach a file. so i send the user to a popup where he selects a file and then i store the files as shown below in a session variables:
$_SESSION['tmp_name'] = $HTTP_POST_FILES["filename"]['tmp_name'];
$_SESSION['name'] = $HTTP_POST_FILES["filename"]['name']

after that the user returns to the flash form. at the end of the form i want to upload all the files. so i acces the session variables and paste their values into my uplaod script.

$tmp_name = $_SESSION['tmp_name'];
$name = $_SESSION['name'];

$filename = basename($name);

$filePath = "../files".$filename ;

if(!move_uploaded_file($tmp_name, $filePath))
    die('Cant copy '.$name.' to '.$filename);

exactly the same script works on immediate upload but not at a later point of time. does anybody know why? and if there is a solution to this.


All times are GMT -4. The time now is 12:53 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.