From b1526d2b426cfd4866db0af7788ed2fb9bb310c6 Mon Sep 17 00:00:00 2001 From: David Renner Date: Mon, 8 Jun 2020 10:10:08 +0200 Subject: [PATCH 1/5] first "form to json" php --- Katalog.htm | 2 +- php/catalogue_search.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 php/catalogue_search.php diff --git a/Katalog.htm b/Katalog.htm index ddfe427..8440c9b 100644 --- a/Katalog.htm +++ b/Katalog.htm @@ -31,7 +31,7 @@ Das war die alte version. -->

Eingabe

-
+ diff --git a/php/catalogue_search.php b/php/catalogue_search.php new file mode 100644 index 0000000..404291c --- /dev/null +++ b/php/catalogue_search.php @@ -0,0 +1,14 @@ +$_GET["Title"],array("Author"=>$_GET["Author"]); + + + + + + Document + + + echo json_encode($form); + + +?> \ No newline at end of file From 5bcfce5caa34570a40fe95d31bb8b0660a7a02a6 Mon Sep 17 00:00:00 2001 From: David Renner Date: Mon, 8 Jun 2020 12:33:06 +0200 Subject: [PATCH 2/5] form data to json per php works! --- Katalog.htm | 16 +++++++++++++--- php/catalogue_search.php | 21 ++++++++------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Katalog.htm b/Katalog.htm index 8440c9b..f92dafd 100644 --- a/Katalog.htm +++ b/Katalog.htm @@ -31,7 +31,7 @@ Das war die alte version. -->

Eingabe

- + @@ -39,10 +39,20 @@ Das war die alte version. --> - + + + - + + +
diff --git a/php/catalogue_search.php b/php/catalogue_search.php index 404291c..b890c99 100644 --- a/php/catalogue_search.php +++ b/php/catalogue_search.php @@ -1,14 +1,9 @@ + + $_GET["Title"],array("Author"=>$_GET["Author"]); - - - - - - Document - - - echo json_encode($form); - - -?> \ No newline at end of file + $form = array("Title"=>$_POST["Title"],"Author"=>$_POST["Author"]); + $form = json_encode($form); + echo $form +?> + + From 17c99c1e4c34b4ee29af6e527044afd89f8a1657 Mon Sep 17 00:00:00 2001 From: David Renner Date: Mon, 8 Jun 2020 12:41:39 +0200 Subject: [PATCH 3/5] . --- php/pasta.php | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 php/pasta.php diff --git a/php/pasta.php b/php/pasta.php new file mode 100644 index 0000000..e00ff22 --- /dev/null +++ b/php/pasta.php @@ -0,0 +1,58 @@ + + + + Test Link + + + +
+ + +
+ + \ No newline at end of file From 104a7493409e51c5344d19a9e89a02a26f1ab41b Mon Sep 17 00:00:00 2001 From: David Renner Date: Mon, 8 Jun 2020 14:05:05 +0200 Subject: [PATCH 4/5] more php done. --- php/catalogue_read.php | 9 +++++++++ php/catalogue_search.php | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 php/catalogue_read.php diff --git a/php/catalogue_read.php b/php/catalogue_read.php new file mode 100644 index 0000000..a516963 --- /dev/null +++ b/php/catalogue_read.php @@ -0,0 +1,9 @@ + + + $value){ + echo $key.": ".$value."[br]"; + } + ?> + \ No newline at end of file diff --git a/php/catalogue_search.php b/php/catalogue_search.php index b890c99..38486d3 100644 --- a/php/catalogue_search.php +++ b/php/catalogue_search.php @@ -1,9 +1,9 @@ - + $_POST["Title"],"Author"=>$_POST["Author"]); $form = json_encode($form); - echo $form ?> +
From 4b44a540a68a9fe8a0783325c1741802cd69bbc4 Mon Sep 17 00:00:00 2001 From: David Renner Date: Mon, 8 Jun 2020 14:42:06 +0200 Subject: [PATCH 5/5] ... --- php/catalogue_read.php | 10 ++++++---- php/catalogue_search.php | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/php/catalogue_read.php b/php/catalogue_read.php index a516963..6cd162a 100644 --- a/php/catalogue_read.php +++ b/php/catalogue_read.php @@ -1,9 +1,11 @@ - - + $value){ + $obj = $_POST; + $form = json_decode($obj); + foreach($form as $key=>$value){ echo $key.": ".$value."[br]"; } + ?> + \ No newline at end of file diff --git a/php/catalogue_search.php b/php/catalogue_search.php index 38486d3..2ab47da 100644 --- a/php/catalogue_search.php +++ b/php/catalogue_search.php @@ -1,9 +1,9 @@ - + $_POST["Title"],"Author"=>$_POST["Author"]); $form = json_encode($form); +// echo $form ?> -