This repository has been archived on 2026-06-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
sgd/ysqld/ysql05d/test3.php
T

68 lines
2.4 KiB
PHP

<!DOCTYPE html>
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Testformular</title>
<?php
require("test2.php")
?>
</head>
<body>
<fileset>
<form action="<?php //echo $_SERVER["PHP_SELF"]; ?>" method="post">
<p>
<label for="kontonummer">Kontonummer Eingeben:</label>
<input type="text" name="kontonummer" id="kontonummer" placeholder="Kontonummer" required autofocus value="<?= htmlspecialchars($_POST['kontonummer']) ?? '' ?>">
</p>
<p>
<label for="betrag">Betrag eingeben</label>
<input type="text" name="betrag" id="betrag" placeholder="Betrag" value="<?= htmlspecialchars($_POST['betrag']) ?? '' ?>">
</p>
<p>
<label for="name">Ihr Name</label>
<input type="text" name="name" id="name" placeholder="Ihr Name" value="<?= htmlspecialchars($_POST['name']) ?? '' ?>">
</p>
<p>
<input type="radio" name="operator" id="erstellen">
<label for="erstellen">Konto Erstellen</label>
<input type="radio" name="operator" id="einzahlen">
<label for="einzahlen">Einzahlen</label>
<input type="submit" value="Ausführen">
</p>
<p>
<?php
switch($_POST['operator'])
{
case "einzahlen":
$test->einzahlung($_POST['betrag']);
break;
case "erstellen":
if (is_numeric($_POST['kontonummer']) && is_numeric($_POST['betrag']) && is_string($_POST['name']) == 1)
{
$test = new Konto($_POST['kontonummer'], $_POST['betrag'],$_POST['name']);
}
break;
}
//$test->einzahlung($_POST['betrag']);
//$wert1 = $_POST['kontonummer'];
//$wert2 = $_POST['betrag'];
//$wert3 = $_POST['name'];
//echo $wert1, $wert2, $wert3;
//$test = new Konto($wert1, $wert2, $wert3);
?>
</p>
</form>
</fileset>
</body>
</html>