first "form to json" php

This commit is contained in:
David Renner 2020-06-08 10:10:08 +02:00
parent a7b851a02d
commit b1526d2b42
2 changed files with 15 additions and 1 deletions

View file

@ -31,7 +31,7 @@ Das war die alte version. -->
<div class="Eingabe">
<h2>Eingabe</h2>
<form action="catalogue_search.php">
<form action="/php/catalogue_search.php">
<input type="text" name="Title" id="input" placeholder="Titel">
<input type="text" name="Author" id="input" placeholder="Autor">
<input type="text" name="Country" id="input" placeholder="Herkunft">

14
php/catalogue_search.php Normal file
View file

@ -0,0 +1,14 @@
<?php
$form = array("Title"=>$_GET["Title"],array("Author"=>$_GET["Author"]);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
echo json_encode($form);
</body>
</html>
?>