- Aufgabe aus PROG (UMDREHER.html und UMDREHER.php)
This commit is contained in:
26
progp/24-10-2/UMDREHER.html
Normal file
26
progp/24-10-2/UMDREHER.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>UMDREHER</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
<h1>UMDREHER</h1>
|
||||
<form action="prog_a2.php">
|
||||
<div class="div_input">
|
||||
<label for="nr_1" class="l if">Nummer 1</label>
|
||||
<input type="number" name="nummer_eins" id="nr1"><br>
|
||||
</div>
|
||||
<div class="div_input">
|
||||
<label for="nr_2" class="l if">Nummer 2</label>
|
||||
<input type="number" name="nummer_zwei" id="nr_2"><br>
|
||||
</div>
|
||||
|
||||
<button type="submit">Tauschen</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
31
progp/24-10-2/UMDREHER.php
Normal file
31
progp/24-10-2/UMDREHER.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>UMDREHER</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
<h1>UMDREHER</h1>
|
||||
<?php
|
||||
$nr_1 = $_REQUEST['nummer_eins']; // 5
|
||||
$nr_2 = $_REQUEST['nummer_zwei']; // 10
|
||||
$nr_tausch = $nr_1;
|
||||
// 10 10
|
||||
|
||||
//5 5
|
||||
$nr_1 = $nr_2;
|
||||
// 5 10
|
||||
$nr_2 = $nr_tausch;
|
||||
echo "
|
||||
<div class='div_input'>
|
||||
<label for='nr_1' class='l if'>Nummer 1:<label class='dr'>". $nr_1."</label></label>
|
||||
<br><label for='nr_2' class='l if'>Nummer 2: <label class='dr'>". $nr_2."</label></label>
|
||||
</div>
|
||||
"
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,7 @@
|
||||
.div_input{
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: cornflowerblue;
|
||||
margin: 2px;
|
||||
@@ -20,9 +24,13 @@ button:hover{
|
||||
width: 98px;
|
||||
}
|
||||
input {
|
||||
background-color: azure;
|
||||
border: 2px solid black;
|
||||
background-color: white;
|
||||
border: 5px outset black;
|
||||
border-radius: 24px;
|
||||
width: 180px;
|
||||
height: 20px;
|
||||
box-shadow: 0px 0px 5px 5px blue;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.main {
|
||||
border: 5px;
|
||||
|
||||
Reference in New Issue
Block a user