From 06061f84dc81ae0b8946ba8d39c658d740f74c75 Mon Sep 17 00:00:00 2001 From: kankys Date: Mon, 30 Sep 2024 17:49:39 +0200 Subject: [PATCH] =?UTF-8?q?107=20funkce=20+=20formul=C3=A1=C5=99=20require?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www2databaze/assets/database.php | 28 ++++++++++++++++++++-------- www2databaze/assets/footer.php | 3 +++ www2databaze/jeden-zak.php | 3 +++ www2databaze/pridat-zaka.php | 18 +++++++++++------- www2databaze/ucimese/funkce.php | 21 +++++++++++++++++++++ www2databaze/zaci.php | 2 ++ 6 files changed, 60 insertions(+), 15 deletions(-) create mode 100644 www2databaze/assets/footer.php create mode 100644 www2databaze/ucimese/funkce.php diff --git a/www2databaze/assets/database.php b/www2databaze/assets/database.php index 5dad3cf..6d249e5 100644 --- a/www2databaze/assets/database.php +++ b/www2databaze/assets/database.php @@ -1,12 +1,24 @@ \ No newline at end of file diff --git a/www2databaze/assets/footer.php b/www2databaze/assets/footer.php new file mode 100644 index 0000000..445bed8 --- /dev/null +++ b/www2databaze/assets/footer.php @@ -0,0 +1,3 @@ + diff --git a/www2databaze/jeden-zak.php b/www2databaze/jeden-zak.php index 680b36a..bf99ee5 100644 --- a/www2databaze/jeden-zak.php +++ b/www2databaze/jeden-zak.php @@ -1,7 +1,10 @@
- +
- +
- +
- +
- +
diff --git a/www2databaze/ucimese/funkce.php b/www2databaze/ucimese/funkce.php new file mode 100644 index 0000000..48395a0 --- /dev/null +++ b/www2databaze/ucimese/funkce.php @@ -0,0 +1,21 @@ +"; + } + + +// Použití +echo studentDescription("Harry", "Potter", 15); +echo studentDescription("Ron", "Weasley", 14); +$student = studentDescription("Hermiona", "Grangerová", 15); +echo $student; \ No newline at end of file diff --git a/www2databaze/zaci.php b/www2databaze/zaci.php index 5771373..9058e93 100644 --- a/www2databaze/zaci.php +++ b/www2databaze/zaci.php @@ -4,6 +4,8 @@ require "assets/database.php"; $sql = "SELECT * FROM student"; +$connection = connectionDB(); + $result = mysqli_query($connection, $sql); if ($result === false) {