----- Original Message -----
From: "Artoo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 12, 2003 10:16 AM
Subject: [PHP] uploading files after passing vars between forms


> Hey
>
> I'm confused!
>
> Do I use move_uploaded_file() or copy() and what is the first parameter of
> both in the following case:
>
... SNIP...
> I get " Warning: Unable to open '' for reading: No such file or
> directory..."
>
> I did have print statements for each of the vars being passed into
> send_file.php to make sure they were seen. And they were.
>
> What fucntion should I use the move_uploaded_file() or copy() and what's
the
> function's first argument so that the file is copied to the server?
>
> Thanks

Hi,

Your problem isn't your code, it's your method.  The temp file is
automatically deleted after confirmation.php dies.  Therefore by the time
you send the tmp_name through to the send_file.php it no longer exists.
What you're going to have to do is copy() the tmp file to a permenant
location within confirmation.php.  And then post that information to
send_file.php with an added subroutine to delete the file if the user goes
back to change some info.

Confirmations are normally only used durring descructive actions so you may
consider ditching the confirmation screen all together.

HTH,
Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to