#2 ondrej39
Neviem ci som dobre pochopil
ale form je:
echo "<td><input type='text' id='poradie[".$dt->id."]' name='poradie[".$dt->id."]' value='".$dt->poradie."' style='width: 50px;'/></td>";
echo "<td><input type='text' id='name[".$dt->id."]' name='name[".$dt->id."]' value='".$dt->name."' class='long'/></td>";
a potom post php:
if($_POST['akcia'] == 'edit_room') {
$obsahPor = $_POST['poradie'];
echo 'POR:'.$obsahPor;
************************
tu nevypise nic
************************
foreach($_POST['name'] as $k => $v) {
$db->runQuery("UPDATE $TBL[ck_resorts_rooms] SET name = '".$v."', poradie = ".$_POST['poradie'][$k].", stav = ".abs($_POST['stav'][$k])." WHERE id = ".$k);