![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 1 Pomógł: 0 Dołączył: 18.11.2013 Ostrzeżenie: (0%) ![]() ![]() |
Czesc,
w ten sposob wyswietlam tabelę z bazy danch: <form name="usun" id="usun" action="<?php echo $PHP_SELF?>" onsubmit="return sprawdz()" method="post" > <?php echo"Aktualne terminy rezerwacji."; $results=pg_query($connection,"select * from ulice_miasta"); echo "<table border=1>\n"; echo"<tr><td>Ulica</td><td>Miasto</td><td></td></tr>"; for($lt = 0; $lt < pg_num_rows($results); $lt++) { echo "<tr>\n"; for($gt = 1; $gt < pg_num_fields($results); $gt++) { echo "<td>" . pg_result($results, $lt, $gt) . "</td>\n"; } for($gt = 0; $gt < pg_num_fields($results); $gt++) { if($gt == 0) { $wybor=pg_result($results, $lt, $gt) ; echo "<td><input type='hidden' name='usun' value=$wybor/> <input type='submit' name='submit' value='USUN'/>$wybor</td>"; } } echo "</tr>\n"; } echo "</table>\n"; ?> </form> niby wyswietla mi koło przycisku "usun" wartości dobre. Ale jak wybiorę którykolwiek przycks "Usun" w ktorymkolwiek wierszu to przekazuje wartość ID ostatniego wiersza tabeli. Gdzie robię błąd? c |
|
|
![]() ![]() |
![]() |
Aktualny czas: 24.08.2025 - 08:29 |