Location: PHPKode > projects > Craigslist Classfieds PHP Clone Script > classifieds/upload-handler.php
<?php
session_start();
$uploaddir = 'postingImages/';    
$uploadfile = $uploaddir . $_SESSION['userID'] . basename($_FILES['userfile']['name']);
//&& ($_FILES["userfile"]["size"] < 20000)
if ((($_FILES["userfile"]["type"] == "image/gif") || ($_FILES["userfile"]["type"] == "image/jpeg") || ($_FILES["userfile"]["type"] == "image/pjpeg"))) {
       
       if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        
        
       } else {
            
            
            
       }
        
} else {
    
    echo 'wrong file type or image too large';
    exit();
    
}

        
?>
Return current item: Craigslist Classfieds PHP Clone Script