From 4f53517553b08a8650f4b932afc418e3c7f54db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=A0krab=C3=A1nek?= Date: Thu, 5 Jan 2023 10:19:31 +0100 Subject: [PATCH] add db instert --- php-insert/index.php | 41 +++++++++++++++++++++++++++++++++++++++++ php-insert/init.php | 9 +++++++++ php-insert/insert.php | 22 ++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 php-insert/index.php create mode 100644 php-insert/init.php create mode 100644 php-insert/insert.php diff --git a/php-insert/index.php b/php-insert/index.php new file mode 100644 index 0000000..ddef3d8 --- /dev/null +++ b/php-insert/index.php @@ -0,0 +1,41 @@ + + + + + + + + + + + + +
+
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/php-insert/init.php b/php-insert/init.php new file mode 100644 index 0000000..a8a271e --- /dev/null +++ b/php-insert/init.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/php-insert/insert.php b/php-insert/insert.php new file mode 100644 index 0000000..73f6b2d --- /dev/null +++ b/php-insert/insert.php @@ -0,0 +1,22 @@ + echo $sql . "
"; + +//vykonání příkazu a následný "report" +if (mysqli_query($conn,$sql) == TRUE) { + echo "příkaz byl vykonán"; +} else { + echo "Error:" .$sql."
". mysqli_errno($conn); +} +//PŘESMĚROVÁNÍ NA HL.STRÁNKU +header("Location: /") +?> \ No newline at end of file