Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 27th, 2005, 10:51 PM
Registered User
Join Date: Jan 2005
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
File Upload hariprasad.nayak Generics 1 July 3rd, 2007 02:03 AM
Filter File Types in ASP.NET File Upload ramuis78 ASP.NET 2.0 Basics 2 May 31st, 2007 10:50 AM
File Upload temmyabudu Classic ASP Components 2 December 15th, 2005 02:40 PM
Whole Folder upload(Multi file Upload) ramasamy_rams XML 1 September 9th, 2005 12:43 PM
JSP file upload and delete file pandjie JSP Basics 0 January 29th, 2005 10:49 PM

All times are GMT -4. The time now is 05:11 PM.

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