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
| <table border="0" cellpadding="1" cellspacing="1">
<tr>
<td> </td>
<td> </td>
<td>TABLE </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>nom</td>
</tr>
<?php
$i = 0;
mysql_select_db($database_chatgr, $chatgr);
$query_CLIENT1 = "SELECT id_client, nom FROM TESTCLI";
$CLIENT1 = mysql_query($query_CLIENT1, $chatgr) or die(mysql_error());
$query_CLIENT2 = "SELECT id_client, nom FROM TESTCLI";
$CLIENT2 = mysql_query($query_CLIENT2, $chatgr) or die(mysql_error());
while (($row = mysql_fetch_row($CLIENT1)) && ($row2 = mysql_fetch_row($CLIENT2))){
$row[1] = ucfirst(strtolower($row[1]));
$i++;
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE TESTCLI SET nom=%s WHERE id_client=%s",
GetSQLValueString($row[1], "text"),
GetSQLValueString($row[0], "int"));
mysql_select_db($database_chatgr, $chatgr);
$Result1 = mysql_query($updateSQL, $chatgr) or die(mysql_error());
}
?>
<tr>
<td><?php echo $i; ?></td>
<? ?>
<td><?php echo $row2[1]; ?></td> <? ?>
<td>
<input name="nom" type="text" id="nom" value="<?php echo $row[1]; ?>" />
</td>
</tr>
<?php } ?>
</table>
<form id="form1" name="form1" method="post" action="">
<input type="submit" name="Submit" value="Submit" />
<input name="MM_update" type="hidden" id="MM_update" value="form1" />
</form> |