![]() |
![]() |
-szczotkap- |
![]()
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
|
|
|
![]() |
-szczotkap- |
![]()
Post
#2
|
Goście ![]() |
Zmieniłem na GET, jednak w dalszym ciągi nie wyświetla nic.
Kod <?php // Connects to your Database mysql_connect("admin", "admin", "admin") or die(mysql_error()); mysql_select_db("admin") or die(mysql_error()); $data = mysql_query("SELECT * FROM terminy") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { Print "<table border=5 cellpadding=4 width=700>"; Print "<tr>"; Print "<th>Termin:</th> <td bgcolor=#133481 align=center width=250> ".$info['nazwa_terminu'] . "</td> "; Print " <td bgcolor=#133481 align=center>".$info['rok'] . " </td>"; Print "<th>Ilość wolnych miejsc:</th> <td align=center width=50>".$info['wolne_miejsca'] . " </td>"; Print "<td align=center width=50><form action=rezerwuj.php method=GET><input type=submit name=".$info['nazwa_terminu'] . " value=rezerwuj ></td>"; Print "</tr>"; Print "</table>"; } ?> Plik docelowy: Kod <html>
<head> <title> Wyniki </title> </head> <body> Wybór: <?php echo $_GET['nazwa_terminu']?><br> </body> </html> |
|
|
![]() ![]() |
![]() |
Aktualny czas: 13.10.2025 - 22:30 |