From 2e8961f0cbf30981e278392389724bc6cf922f73 Mon Sep 17 00:00:00 2001 From: baiobelfer Date: Mon, 8 Sep 2025 15:23:40 +0200 Subject: [PATCH] feat: add database integration and dynamic product listing Co-authored-by: aider (openrouter/deepseek/deepseek-chat-v3.1) --- config/database.php | 13 +++++++++++ i1.html | 55 +++++++++++++++++++++++++-------------------- raty.html | 6 ++--- 3 files changed, 47 insertions(+), 27 deletions(-) create mode 100644 config/database.php diff --git a/config/database.php b/config/database.php new file mode 100644 index 0000000..c172c70 --- /dev/null +++ b/config/database.php @@ -0,0 +1,13 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +} catch (PDOException $e) { + die("Database connection failed: " . $e->getMessage()); +} +?> diff --git a/i1.html b/i1.html index 659ceb8..c8e63ae 100644 --- a/i1.html +++ b/i1.html @@ -2,53 +2,60 @@ - Kursy komputerowe + Sklep z obuwiem
- kursy komputerowe -
Kursy komputerowe
+ sklep z obuwiem +
Sklep z obuwiem
-
-

Kursy komputerowe - programowanie

+

Oferta obuwia

- - + + + - - - - - - - - - - - - - - - + query(" + SELECT b.model, k.nazwa_kat, b.nazwa, b.cena, b.opis + FROM obuwie_buty b + JOIN obuwie_kategorie k ON b.id_kat = k.id_kat + "); + + while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + } catch (PDOException $e) { + echo ""; + } + ?>
KursCzas trwaniaModelKategoria CenaOpis
React.js4 miesiące1500 zł
JavaScript3 miesiące1200 zł
HTML + CSS2 miesiące800 zł
" . htmlspecialchars($row['nazwa']) . "" . htmlspecialchars($row['nazwa_kat']) . "" . number_format($row['cena'], 2) . " zł" . htmlspecialchars($row['opis']) . "
Błąd przy ładowaniu danych: " . $e->getMessage() . "

Adres do korespondencji

  • Adres: Katowice, ul. Mariacka 5
  • Telefon: 32 888 88 88
- skontaktuj się + skontaktuj się