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
|
<table width="200" border="1" class="maj">
<tr>
<td>table</td>
<td>collone</td>
<td>valeur</td>
</tr>
<?php
$x = new DOMDocument("1.0", "utf-8");
$x->load("../../nv.xml");
if (!$x ) { return false; }
//******************************
if (!@$x->validate()) { return false; }
$n = $x->getElementsByTagName("table")->item(0);
echo "ouiiiiiiiiiiiii";
foreach ($n as $table) {
$p = $table->getElementsByTagName("column");
foreach ($p as $cool) {?>
<tr>
<td><?php echo $table->firstChild ; ?></td>
<td><?php echo $coll->firstChild ;?></td>
<td><?php echo $coll->firstChild->nodeValue ;?></td>
</tr>
<?php mysql_query("UPDATE ".$table->firstChild." SET '".$coll->firstChild."' = ".$coll->firstChild->nodeValue) or die("Erreur MySQL : ".mysql_error());
}
}?>
</table> |
Partager