Reply to Re: If No Image { }

Re: If No Image { } new!
by colin, 17 years, 4 months ago
Something like this maybe?

$handle = new upload($_FILES['image_field']);
if ($handle->uploaded) {
  if ($handle->file_is_image) {
    // file is an image
    $handle->image_resize = true;
    $handle->image_x = 200;
    $handle->process('Test');
    if ($handle->processed) {
      echo 'file uploaded';
      $handle->clean();
    } else {
      echo 'error : ' . $handle->error;
    }
  } else {
    // file is not an image
    $handle->clean();
  }
}
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important