Zle troche to sprecyzowalem.Korzystam ze smartiego. Mam dwie formy w dwoch roznych divach. Z tych dwoch form potrzebuje wyslac do innego pliku wartosci tj. w przypadku edycji np. id ktore ma zostac przypisane dla zaznaczonych elementow w chceckboxach.
pierwsza forma:
Kod
<form name="chk" action="index.php" method="get" id="1">
<input type="hidden" value="inventarization" name="show">
<input type="hidden" value="check" name="action">
<input type="hidden" value="{$room}" name="room">
<input type="hidden" value="go" name="step3">
<input type="hidden" value="{$zm}" name="option">
{foreach item=i from=$inv_item2}
<input type="hidden" name="inv[{$smarty.foreach.inv_item2.iteration}]" value="{$i.i_barcode}">{/foreach}
{if $zm eq "owner"}
<select name="own" size="1">
<option>Select New Owner </option>
{foreach item=ang from=$chown}
<option value="{$ang.angestellterid}">{$ang.person} </option>
{/foreach}
<input type="submit" value="Change">
</select>
{elseif $zm eq "room" }
<select name="roomid" size="1">
<option>Select New Room number </option>
{foreach item=r from=$rnr}
<option value="{$r.r_id}">{$r.r_roomnr} </option>
{/foreach}
<input type="submit" value="Change">
</select>
{/if}
</form>
druga forma
Kod
<form method="get" name="chk" action="index.php" id="1">
<input type="hidden" value="inventarization" name="show">
<input type="hidden" value="check" name="action">
<input type="hidden" value="{$room}" name="room">
<input type="hidden" value="go" name="step3">
<input type="hidden" value="{$zm}" name="option">
<table class="m648">
<tr>
<b>Step 3. In this step you can change room number or owner. If you want to do changes first you must <u><i>choose action!!!</i></u> In the other case click NEXT button. </b>
</tr>
<tr>
<b><th colspan="12">This table display inventar, which is now alocated in this room.</th></b>
</tr>
<tr>
<th colspan="2" width="20" ></th>
<th colspan="2" width="150">Category</th>
<th colspan="2" width="150">Name</th>
<th colspan="2" width="150">Room nr</th>
<th colspan="2" width="150">Owner</th>
<th colspan="2" width="200">Barcode</th>
</tr>
{foreach name="aa" item=inv_item from=$inv_item2}
<tr> <td colspan="2" align="center" >
<input type="checkbox" name="ch[]" value="{$inv_item.i_barcode}" /></td>
<td colspan="2" align="center">{$inv_item.c_name}</td>
<td colspan="2" align="center">{$inv_item.i_name}</td>
<td colspan="2" align="center">{$inv_item.r_roomnr}</td>
<td colspan="2" align="center">{$inv_item.owner}</td>
<td colspan="2" align="center">{$inv_item.i_barcode}<input type="hidden" name="inv[{$smarty.foreach.inv_item2.iteration}]" value="{$inv_item.i_barcode}"></td>
<td>
<a href="index.php?barcode={$inv_item.i_barcode}&show=inventar&action=edit&roomid={$inv_item.i_roomid}">
<img src="img/bearbeiten.gif" alt="EDIT">
</a>
</td>
</tr>
{/foreach}
<tr>
<b><th colspan="12">This table display inventar, which is alocated in this room and currently rented.</th></b>
</tr>
{foreach name="a" item=inv_item6 from=$rented}
<tr> <td colspan="2" align="center" >
<input type="checkbox" name="ch[]" value="{$inv_item6.i_barcode}" /></td>
<td colspan="2" align="center">{$inv_item6.c_name}</td>
<td colspan="2" align="center">{$inv_item6.i_name}</td>
<td colspan="2" align="center">{$inv_item6.r_roomnr}</td>
<td colspan="2" align="center">{$inv_item6.owner}</td>
<td colspan="2" align="center">{$inv_item6.i_barcode}
<input type="hidden" name="inv[{$smarty.foreach.rented.iteration}]" value="{$inv_item6.i_barcode}"></td>
<td>
<a href="index.php?barcode={$inv_item6.i_barcode}&show=inventar&action=edit&roomid={$inv_item6.i_roomid}">
<img src="img/bearbeiten.gif" alt="EDIT">
</a>
</td>
</tr>
{/foreach}
<tr>
<b><th colspan="12">This table display inventar, which is not rented and not present but alocated in this room.</th></b>
</tr>
{foreach name="aaa" item=inv_item5 from=$notin}
<tr> <td colspan="2" align="center" >
<input type="checkbox" name="ch[]" value="{$inv_item5.i_barcode}" /></td>
<td colspan="2" align="center">{$inv_item5.c_name}</td>
<td colspan="2" align="center">{$inv_item5.i_name}</td>
<td colspan="2" align="center">{$inv_item5.r_roomnr}</td>
<td colspan="2" align="center">{$inv_item5.owner}</td>
<td colspan="2" align="center">{$inv_item5.i_barcode}
<input type="hidden" name="inv[{$smarty.foreach.not_in.iteration}]" value="{$inv_item5.i_barcode}"></td>
<td>
<a href="index.php?barcode={$inv_item5.i_barcode}&show=inventar&action=edit&roomid={$inv_item5.i_roomid}">
<img src="img/bearbeiten.gif" alt="EDIT">
</a>
</td>
</tr>
{/foreach}
</table>
</tr>
<tr>
<td colspan="12" align="center">
<input type="reset" value="Zurücksetzen" onclick="javascript:history.go(-1);"/>
<input type="submit" value="NEXT >"></td>
</form>
W drugiej formie wyswietlam dane z 3 tablic w jednej tabelce. Przy kazdym mam checkboxa. Pierwszy listing to kawalek takiego jakby menu.
I teraz chodzi mi o to kiedy wybiore cos z menu np. change owner, wtedy wyskakuje mi dodatkowe pole z wyborem ownera i przyciskiem zatwierdz. Jesli zatwierdze, to wszystkie zaznaczone przedmioty musza miec takiego ownera jakiego wybralem.
Niestety nie dziala

, i nie wiem gdzie popełniam błąd. Proszę o pomoc.