Help figuring out an uploading script problem...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have this script that is no longer working to upload files, it goes thru
the motions and says the file is uploaded but then there is NO file in the
ArtWork folder....

any ideas?
    if ($_FILES) {
        for ($x=0; $x < 15; $x++) {
            if (is_uploaded_file ($_FILES['Artwork']['tmp_name'][$x])) {
                $ImageExt = strtolower(end(explode('.',
$_FILES['Artwork']['name'][$x])));
                $ImageName = $_FILES['Artwork']['name'][$x];
                $ImageSize = $_FILES['Artwork']['size'][$x];
                list($width, $height, $type, $attr) =
getimagesize($_FILES['Artwork']['tmp_name'][$x]);

                $sql = "INSERT INTO images (ImageDate, ArtID, AdminID,
ImageName, ImageType, ImageType2, ImageSize, ImageHeight, ";
                $sql .= "ImageWidth, ImageAttr, Notes) VALUES (NOW(),
'$ArtID', '$AdminID', '$ImageName', '$ImageExt',";
                $sql .= " '$type', '$ImageSize', '$height', '$width',
'$attr', '$Notes2')";
                mysql_query ($sql);
                $ImageID = mysql_insert_id();

                $uploadfile = "../../Artwork/". $ArtID ."_". $ImageID .".".
$ImageExt;
                move_uploaded_file($_FILES['Artwork']['tmp_name'][$x],
$uploadfile);
                chmod($uploadfile, 0666);
            }
        }
    }

Thanks
Terion

Happy Freecycling
Free the List !!
www.freecycle.org
Over Moderation of Freecycle List Prevents Post Timeliness.
Report Moderator Abuse Here:
http://www.freecycle.org/faq/faq/contact-info
Or Email Your Complaint to:
faq@xxxxxxxxxxxxx or info@xxxxxxxxxxxxx
------------------------------------------------
Twitter?
http://twitter.com/terionmiller
------------------------------------------------
Facebook:
<a href="http://www.facebook.com/people/Terion-Miller/1542024891";
title="Terion Miller's Facebook profile" target=_TOP><img src="
http://badge.facebook.com/badge/1542024891.237.919247960.png"; border=0
alt="Terion Miller's Facebook profile"></a>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux