FrontendDavid/php/addKatalog.php
2020-06-11 07:05:19 +02:00

37 lines
1.5 KiB
PHP

<?php
if(isset($_POST["go"]))
{
$form = array(
"Title"=>$_POST["Title"],
"Author"=>$_POST["Author"]);
$json = json_encode($form);
//echo $json;
// Dieser Schritt dient nur um die Daten wieder in der Ausgabe anzeigen zu lassen,
//muss später noch an eine andere Stelle gepackt werden 8z.B. nach dem Empfang von Daten aus der API)
$json2= json_decode($json, true);
}
?>
<h2>Eingabe</h2>
<form action="" method="post">
<input type="text" name="Title" class="input" placeholder="Titel">
<input type="text" name="Author" class="input" placeholder="Autor">
<input type="text" name="Country" class="input" placeholder="Herkunft">
<input type="url" name="Link" class="input" placeholder="Link">
<input type="text" name="Language" class="input" placeholder="Sprache">
<input type="number" name="Pages" class="input" placeholder="Seiten" min="0">
<input type="number" name="Year" class="input" placeholder="Erscheinungsjahr" min="0">
<select class="input" name="Category">
<option>Book</option>
<option>Magazin</option>
<option>EBook</option>
<option>EPaper</option>
</select>
<input type="url" name="ImageLink" class="input" placeholder="Bild">
<input type="number" name="LendTime" class="input" placeholder="Verteihdauer" min="0">
<select class="input" name="Category">
<option>Physical</option>
<option>Virtual</option>
</select>
<input type="submit" name="go" id="go">
</form>