Bonjour à tous, je vous explique mon problème:

J'ai créer un tableau statique, puis j'y ai ajouté 2 colonnes qui permettent la saisie de données (avec des listes déroulantes).
Maintenant j'ai donc un formulaire tableau

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
<form action="a_facturer.php">
<table class="Tabledonnees">
  <thead>
    <tr>
      <th>Numéro contrat</th>
      <th>Nom locataire</th>   
      <th>Date mandat</th>
      <th>A la charge</th>
      <th>Statut matériel</th>
      <th>Statut mandat</th>
      <th>Type mandat</th>
      <th>Facture 1</th>
      <th>Montant 1</th>
      <th>Facture 2</th>
      <th>Montant 2</th>
      <th></th>               
    </tr>
  </thead>
<?php
  $altenative = $numligne = 0 ;
  $vide = "vrai"; 
  $c_ligne = $c_ligne2="" ;
  ?>
 
  <?
  while ($ligne = mysql_fetch_array($exec)) :
?>
    <tr valign=top>
      <!--<td><?php echo ($numCon = getNumCon($ligne["NUM_DOS"])) ?></td>-->
      <td>
        <a href="<?php echo 'detail_dossier.php?NUM_DOS='.$ligne["NUM_DOS"].'&onglet=6&NUM_CON='.$numCon ?>">
          <?php echo $numCon ?>
        </a>
      </td>
      <td><?php echo $ligne["DEN_LOC"] ?></td>
      <td><?php echo datemysql2francais($ligne["DATE_DOS"]) ?></td>
      <td><?php echo $ligne["DEN_CLI"] ?></td>
      <td><?php echo htmlentities($ligne["LIB_STA"]) ?></td>
      <td><?php echo htmlentities($ligne["LIBE_STA_DOS"]) ?></td>
      <td><?php echo $ligne["LIB_TYP_MANDAT"] ?></td>
      <td><?php echo select_facture($ligne["NUM_FACT"]) //fonction qui fait une liste déroulante avec les factures?></td>
      <td><?php echo $ligne["MT_FACT"] ?></td>
      <td><?php echo select_facture($ligne["NUM_FACT2"]) ?></td>
      <td><?php echo $ligne["MT_FACT2"] ?></td>
      <td>
        <a href="rapport_activite.php?NUM_DOS=<?php echo $ligne["NUM_DOS"] ?>" target="_blank">
          <img src="img\b_print.png" border="0" width="16" height="16" alt="Rapport d'activité">
        </a>
      </td>   
    </tr>   
<?php endwhile; ?>   
</table>
 
<p style="text-align: center;"><input name="modi" type="submit" class="button" value="Enregistrer les modifications"></p>
</form>

Je renvoie les données sur la même page et les traite de cette façon:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?
if(isset($_REQUEST["modi"]))
{
 
//echo "test";
var_dump($_REQUEST["NUM_FACT"],$_REQUEST["NUM_FACT2"]);
$sqlUP="update locataire set NUM_FACT='".$_REQUEST["NUM_FACT"]."' ,
NUM_FACT2='".$_REQUEST["NUM_FACT2"]."'
where NUM_DOS='".$_REQUEST["NUM_DOS"]."'
";
$execUP=mysql_query($sqlUP) or die(mysql_error());
 
}
?>

Déjà j'ai pluieurs problèmes: $_REQUEST["NUM_FACT"] prends en fait la valeur de la dernière liste déroulante qui devrait logiquement être $_REQUEST["NUM_FACT2"] qui du coup n'est pas défini.

Ensuite je voudrais mettre à jour le champ pour un numéro de dossier (ce que j'ai mis dans la requête), mais le $_REQUEST["NUM_DOS"] n'est pas défini non plus

Merci de m'aider