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">
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<title>multiple file upload</title>
	<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 ">

if (isset($_FILES['files'] ))	
foreach ($_FILES['files']['tmp_name'] as $key => $tmp_name){
	move_uploaded_file($tmp_name, "uploaded/{$_FILES['files']['name'][$key]}");



Only Opera and Chrome seem to support this. You'll have to validate this on the server side too.

Member Avatar

This is a truly kick-ass ajax (jquery) file uploader. I believe it will also limit the allowed extensions.


sorry couldn't responce earlier, No internetconection there was a internetserver problem.

Wel i had the file uploaded to my webserver and yes it did not worked in ie.
I even tested in firefox, chrome,safari and opera and there it seems to work.
I try to find another way because it worked only in firefox proper.
thanks for your advice

i try later the link that Ardav wrote

Many greetings John