Yeah I tried that as well, no dice, however here is what I the code that DID
work.  Hope this helps anyone that is trying to accomplish much of the same.
Jas
<?php
session_start(); //start the session if one hasn't been started
if (isset($HTTP_SESSION_VARS['user']) ||
isset($HTTP_SESSION_VARS['password'])) { // check for username and password
in session
 $main = "Your changes have been saved to the database. If you need to make
more changes please select the page from the menu and follow the
instructions."; // echo this somewhere on your page
    elseif ($img1_name != "" && eregi('.jpg$', $img1_name)) { // check for
empty file or .jpg file for upload
    @copy("$img1", "/path/to/images/directory/$img1_name") or die ("Could
not upload file, please try again after making sure the file is less
than 2mb in size and the file name correct"); // upload the file or error if
not correct type or empty value for file
 } else {
   die("No file selected for upload, or the file was not the correct type.
Please only upload .jpg files."); // kill upload
    }

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wednesday 22 May 2002 07:02, Jas wrote:
> > Ok here is my error message:
> > Warning: Unable to open '' for reading: No such file or directory in
> > upload_done.php on line 9
> >
> > I have checked permissions on the folder and they are correct, my only
> > guess is that upon doing several checks, session vars, etc... it is
loosing
> > the file name somewhere.
>
> Try modelling your code on the example in the manual.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> sticktion
> */
>



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

Reply via email to