Voll Upload SGD Fachinformatiker PHP
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user