Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]Jak przekazać parametr
-szczotkap-
post
Post #1





Goście







Witam.

Chciałbym zrobić mały system do rezerwacji.
Mój kod pobiera z MySql z tabeli dane i wyświetla je na stronie:

[Musiałam wyciąć bo Geshi zwariowało]

Co robię źle. Jak rozwiązać ten problem?
Powód edycji: [Daiquiri]: Wycinka
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
-szczotkap-
post
Post #2





Goście







Dzięki Daiquiri. Działa, ale pod IE. Pod Chromem przekazuje mi jakieś dziwne wartości (zawsze przekazuje mi wartość 19).

  1. <?php
  2. mysql_connect("localhost", "admin", "admin") or die(mysql_error());
  3. $data = mysql_query("SELECT * FROM terminy")
  4.  
  5. while($info = mysql_fetch_array( $data ))
  6. {
  7.  
  8. Print "<table border=5 cellpadding=4 width=700>";
  9. Print "<tr>";
  10. Print "<th>ID</th> <td bgcolor=#133481 align=center width=6> ".$info['id'] . "</td> ";
  11. Print "<th>Termin:</th> <td bgcolor=#133481 align=center width=250> ".$info['nazwa_terminu'] . "</td> ";
  12. Print " <td bgcolor=#133481 align=center>".$info['rok'] . " </td>";
  13. Print "<th>Ilość wolnych miejsc:</th> <td align=center width=50>".$info['wolne_miejsca'] . " </td>";
  14. Print "<td align=center width=50><form action=rezerwuj.php method=GET><input type=text name=rezerw value=".$info['id'] . " ><input type=submit value=Rezerwuj!></td>";
  15. Print "</tr>";
  16. Print "</table>";
  17. }
  18.  
  19.  
  20. ?>



  1. <html>
  2. <head>
  3. <title>
  4. Wyniki
  5. </title>
  6. </head>
  7. <body>
  8. Wybór:
  9. <?php print $_GET['rezerw']?><br>
  10.  
  11. </body>
  12. </html>
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: 13.10.2025 - 16:21