<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Neuer Kunde</title>
</head>
<body>
    <h1>DANIEL CWIKLA</h1>
    <form>
        <label>Kundennummer: <input name="kdnr" type="number"></label><br>
        <label>Nachname: <input name="nachname" type="text"></label><br>
        <label>E-Mail: <input name="email" type="email"></label><br>
        <button type="submit">Anlegen</button>
    </form>
</body>
</html>

<?php
// DANIEL CWIKLA
require_once 'funktionen.php';
require_once 'db_connect.php';

if(!empty($_REQUEST)){
    $dbh = db_connect();
    echo kundeEinfuegen($dbh, $_REQUEST['kdnr'], $_REQUEST['nachname'], $_REQUEST['email']);
}
?>