Bonjour,

j'ai un souci sur un formulaire avec type=file pour un upload d'image

photo.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
<head>
<script type="text/javascript" src="jquery-1.1.3.1.pack.js"></script>
<script type="text/javascript">
 
jQuery(document).ready(function(){
 
	$('#photoform').submit(function(){
 
		var action = $(this).attr('action');
 
		$('#submit')
			.before('<img src="loader.gif" class="loader" />')
			.attr('disabled','disabled');
 
		$.post(action, { 
			nom: $('#nom').val(),
			message: $('#message').val(),
			fichier: $('#fichier').val()
 
		},
			function(data){
				$('#photoform #submit').attr('disabled','');
				$('.response').remove();
				$('#photoform').before('<span class="response">'+data+'</span>');
				$('.response').slideDown();
				$('#photoform img.loader').fadeOut(500,function(){$(this).remove()});
				if(data=='Message sent!') $('#photoform').slideUp();
			}
		);
 
		return false;
 
	});
 
});
 
</script>
</head>
<form id="photoform" action="photo_valid.php" target="upload_iframe" method="post" enctype="multipart/form-data">
 
 
<iframe id="upload_iframe" name="upload_iframe" style="display:none;"></iframe>
<input id="nom" name="nom" class="text" />
<input type="file" name="fichier" />
dans photo_valid.php je ne recoit pas $_FILES['fichier'];

merci pour les idees