Example #1
0
}
//process the script only if the form has been submitted
//set max upload size
$max = 10485760;
//$max = 104857600; //in bytes
if (isset($_POST['project_entry'])) {
    //define the path to the upload folder
    //$destination = 'C:/upload_test/';// WIN
    //$destination = '/Users/jae/upload_test/'; //MAC
    $destination = 'C:/wamp/www/aikiosk/uploads/';
    require_once '../classes/Ps2/Upload.php';
    try {
        $upload = new Ps2_Upload($destination);
        $upload->setMaxSize($max);
        $upload->move();
        $result = $upload->getMessages();
        $upload->getFileName();
        //process text form, assign to variable names for easier use
        $image_filename = $upload->getFileName();
        //$image_url = $_POST['image_url'];
        //$image_desc = $_POST['image_desc'];
        //echo "does this work";
        //echo $field['name'];
        //echo "we grabbed this from Upload: " . $upload->getFileName() . "<br/>";
        //echo "Check this!<br />";
        //echo $image_filename . "<br />";
        //include the text validation form
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    //move_uploaded_file($_FILES['image']['tmp_name'], $destination . $_FILES['image']['name']);