Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Wyświetlnie rekordów, w formie
Domin
post
Post #1





Grupa: Zarejestrowani
Postów: 136
Pomógł: 0
Dołączył: 17.11.2004
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Hej,

Mam taki o to kod.

  1. <? 
  2. $query5 = "SELECT * FROM cadre ORDER BY name ASC";
  3. $result5 = mysql_query ($query5) or die(mysql_error());
  4. $num5 = mysql_num_rows($result5);
  5. if ($num5 > 0) {
  6. while ($row5 = mysql_fetch_array($result5, MYSQL_ASSOC)) {
  7. $pilkarz[] = $row5['player_id'];
  8. $name[] = $row5['name'];
  9. $option = "<div align='left'> <input type='checkbox' name='".$pilkarz."' value='1'>".$name[0]."</div>";
  10. }
  11. }
  12. ?>
  13. <form name="form_pilkarz" enctype="multipart/form-data" action="index.php" method="post">
  14. <input type="hidden" name="action" value="pilkarz">
  15. <?
  16. echo $option;
  17. ?>
  18. <div class="center"><input type="button" onclick="document.form_pilkarz.submit()" class="button" value="<? echo p_2501; ?>" /></div>
  19. </form>


W bazie mam dwa rekordy, ale nie wiem czemu powyższy kod wyświetla mi tylko jeden? Proszę o pomoc
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 15:05