Im having trouble getting this to work, i want to validate that the uploaded image ($picture) is a gif or jpeg.
Can anyone possibly help?PHP Code:
// Validate the image type. Should be jpeg, jpg, or gif.
$allowed = array ('image/gif', 'image/jpeg', 'image/jpg');
if (in_array($_FILES['picture']['type'], $allowed))
$errors['picture2'] = 'Please ensure the image is a JPEG or GIF.';