ihave a script for a multifile uoload
my question is how can i create it so that i can upload only jpg files
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>multiple file upload</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<input name="files[]" type="file" multiple="multiple" accept="image/gif, image/jpeg" min="1" max="9999">
<input name="upload" type="submit" class="box" id="upload" value=" Upload ">
</form>
<?php
if (isset($_FILES['files'] ))
{
foreach ($_FILES['files']['tmp_name'] as $key => $tmp_name){
move_uploaded_file($tmp_name, "uploaded/{$_FILES['files']['name'][$key]}");
}
}
?>
Thanks