Bonjour, je suis assez embeté, mon input file ne marche pas, il ne me renvoit rien, je me prends al tete depuis ce matin, je comprends pas ce qu'il se passe, est ce que quelqu'un peu m'aider svp ?

voici ma page :

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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
include_once('fonctions-systemes.php');
include_once('constantes.php');
if( !isset( $_SESSION['login'] ) )
{
  header("location:/index.php");
  exit();
}
$SessionLogin = $_SESSION['login'];
 
if(isset($_POST['modif'])) echo "MODIIIIF<br>";
if(isset($_POST['go'])) echo "GOOOOOOO<br>";
 
$Conn = mysql_connect($host,$user,$pwd);
mysql_select_db($bdd,$Conn) or die ("ERREUR");
$sql = "select EXTENSION from utilisateurs where LOGIN = '".$SessionLogin."' ";
$res = mysql_query($sql) or die('Erreur SQL ! <br />'.$sql.'<br />'.mysql_error());
$NumRows = mysql_num_rows($res);
while($data = mysql_fetch_assoc($res))
{
  $ExtensionBase = $data['EXTENSION'];
}
mysql_close($Conn);
echo "9<br>";
if( isset( $_POST['modif'] )  )
{
  echo "0<br>";
  if( $_FILES['inser']['name'] != "" )
  {
    echo "1<br>";
    $NomPhoto = $_FILES['inser']['name'];
    // renvoi 'image/gif'  ... donc on prend 'image' et si les 5 premiers caracteres du type ne forment pas "image" c'est que ce n'est pas une image
    if(substr($_FILES['inser']['type'],0,5) != 'image')
    {
      $ErreurPhoto = "<br>Format de photo non support ! ";
      break;
    }
    elseif($_FILES['inser']['size'] > '50000')
    {
      $SizeEnTropKo = ($_FILES['inser']['size'] - 50000)/1024;
      $SizeEnTropKo = sprintf('%.02f',$SizeEnTropKo);
      $TailleKo = $_FILES['inser']['size']/1024;
      $TailleKo = sprintf('%.02f',$TailleKo);
      $ErreurPhoto = "<br>Taille trop importante, tu es ".$SizeEnTropKo."Ko en trop. [".$TailleKo."Ko]";
      break;
    }
    else
    {
      // on remplace certains caractres spciaux par leur correspondant en ASCII - Caractre normal autoris pour l'enregistrement correct du fichier
      $NomPhoto = strtr($NomPhoto, '', 'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy');
 
      //on remplace chacun de ces caractres par '_'
      $NomPhoto = preg_replace('/([^.a-z0-9]+)/i', '_', $NomPhoto);
 
      // on remplace les espaces que peuvent contenir les fichiers par '_'
      $NomPhoto = str_replace(" ", "_", $NomPhoto );
 
      $CheminPhoto = "../".$CheminMembres.$PostLogin."/";
 
      if(!is_dir($CheminPhoto)) 
      {
        mkdir($CheminPhoto);
      }
 
     //Copie dans le repertoire du script
      if(move_uploaded_file($_FILES["inser"]["tmp_name"], $CheminPhoto.$NomPhoto))
      {
        $ElementsPhoto = pathinfo($NomPhoto);
        $Extension = $ElementsPhoto['extension'];
        rename($CheminPhoto.$NomPhoto, $CheminPhoto."profil.".$Extension);
      }
      else
      {
        echo "<span class='Petit'>Le fichier n'a pas t upload (trop gros ?) ou ". "Le dplacement du fichier temporaire a chou" - " ";
        echo "vrifiez l'existence du rpertoire ".$CheminPhoto."</span>";
      }
      $Conn = mysql_connect($host,$user,$pwd);
      mysql_select_db($bdd,$Conn) or die ("ERREUR");
      $sql = "update utilisateurs set PHOTO = 1, EXTENSION = '".$Extension."' ";
      $ErreurPhoto = "<span class='Petit'>Photo t&eacute;l&eacute;charg&eacute;e avec succ&egrave;s.</span>";
      $Tag = "ok";
    }
  }  
  else
  {
    $ErreurPhoto = "<span class='Erreur'>Euh... avec une photo &ccedil;a serait mieux, nan ?</span>";
  }
}
?>
<!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" xml:lang="en"><!-- InstanceBegin template="/Templates/template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Modifier sa photo</title>
<!-- InstanceEndEditable -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/includes/menu.css" rel="stylesheet" type="text/css">
<link href="/includes/style-general.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body style='font-family:arial;font-size:12px;' >
<font size=1><b>(<a href='accueil.htm' target='blank'><font color='red'>CLIQUEZ-ICI</font></a> si vous voulez etre redirig&eacute; 
vers l'ancienne page d'accueil)</b></font>
<table width='97%' height='98%' border=0 cellspacing=3 cellpadding=3>
  <tr>
    <td width=160 rowspan="2"><form action="/connexion.php" method="POST" name="log" id="log"><?php include_once('menu.php'); ?></form></td>
  </tr>
  <tr>
    <td valign='top'><!-- InstanceBeginEditable name="Corps" --><FORM ACTION="modif_photo.php" METHOD="POST" NAME="modif" enctype="multipart/form-data">
    <center><p><br>MODIFICATION DE TA PHOTO DE PROFIL<br /></p>
      <table width="90%" height="235" border="0" cellpadding="0" cellspacing="0" style="font-size:13px;">
      <tr>
        <td width="100%" height="43" align='center'>Modifie une photo de  toi : (<b>50Ko</b> maxi)<br />
        <span class="Petit">(Formats conseill&eacute;s : *.JPG ou *.GIF)</span></td>
      </tr>
      <tr>
        <td height="192" align='center'>
        <p><input type="file" name="inser" id="inser" /><br /><?php if( isset( $ErreurPhoto ) && $ErreurPhoto != "" ) echo $ErreurPhoto; ?></p>
        <p><input type="submit" name="go" id="go" value="GO !" tabindex=20 /></p>
        <?php
        if( isset( $NomPhoto ) && $NomPhoto != "" )
        {
          echo "<p>Photo actuelle :</p><p><img src='membres/".$SessionLogin."/profil.".$Extension."'></p>";
        }
        elseif( isset( $ExtensionBase ) && $ExtensionBase != "" )
        {
          echo "<p>Photo actuelle :</p><p><img src='membres/".$SessionLogin."/profil.".$ExtensionBase."'></p>";
        }
        else
        {
          echo "<b>ERREUR !!!!!!</b>";
        }
        ?>td>
      </tr>
    </table>
    </center>
    </form>
  <!-- InstanceEndEditable --></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>
Pour mes tests, j'ai fais un ECHO de 9, un ECHO de 0, puis un ECHO de 1, seul le 9 s'affiche mais pas le 0 ni le 1, j'en présume donc que le formulaire ne marche pas mais je ne sais pas pourquoi.

Merci d'avance

Ju'