Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php][html] rekord z bazy danych i wzucenie go do htm Value
imashjan
post
Post #1





Grupa: Zarejestrowani
Postów: 73
Pomógł: 0
Dołączył: 30.11.2005

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


Chodzi mi o to aby pobrać z bazy danych jeden wiersz, i wrzócić go do html Value. Napisalem cos takiego :
  1. <?php
  2. mysql_connect('*******','********','*********') or die('Brak Polaczenia');
  3. mysql_select_db('***********') or die('Brak Polaczenia');  
  4.  
  5.  $wynik = mysql_query ("SELECT * FROM rodzaj ORDER BY nazwa");
  6.  if ($rekord = mysql_fetch_assoc($wynik)) {
  7.  $nazwa = $rekord['nazwa'];
  8.  }
  9.  function generuj_menu($nazwa , $options, $deflaut="")
  10.  {
  11.  $html = "<select name="$nazwa">";
  12. foreach($options as $value => $label) {
  13. $html .= "<option ";
  14. if ($value == $default)
  15. $html .= "SELECTED";
  16. $html .="VALUE ="$value">$label</option>";
  17. }
  18. $select .="</select>";
  19. return($html);
  20. }
  21. ?>


i wyzuca mi taki bład
Warning: Missing argument 1 for generuj_menu() in /panel_rejestracji.php on line 9

Co robie zle?

Ten post edytował imashjan 1.09.2006, 14:33:26
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 - 06:05