M
makai
Guest
Hallo Leute! verzweifel hier ein bisschen, hab in der Berufsschule so eine kleine Aufgabe zum php-rechnen bekommen... aber leider wird nichts ausgerechnet :) Ich hoffe jemand von euch kann den Fehler finden:
Danke! Grüße, makai
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Geiles Museum</title>
<style>
body {
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#000;
background-color:#663;
}
h1 {
text-align:center;
margin:0;
padding-top:20px;
padding-bottom:10px;
}
#wrapper {
width:600px;
height:auto;
margin-left:auto;
margin-right:auto;
border:solid 1px #000;
}
#banner {
width:600px;
height:200px;
text-align:center;
vertical-align:middle;
background-color:#633;
color:#FC0;
font-size:18px;
border-bottom:solid 1px #000;
}
#content1 {
width:540px;
background-color:#FFC;
border-bottom:solid 1px #000;
padding:0px 30px 0px 30px;
}
label {
width:250px;
display:block;
float:left;
height:21px;
line-height: 21px;
}
input.text {
width:50px;
margin-right:10px;
text-align:center;
float:left;
}
input {
}
span {
line-height:21px;
}
#content2 {
width:600px;
text-align:center;
background-color:#FFC;
}
</style>
</head>
<body>
<!--PHP_Teil-->
<?php
$zehneuro = 10;
$siebeuro = 7;
$ergebnis = $azahl * $zehneuro + $bzahl * siebeuro;
?>
<!--HTML-Teil-->
<div id="wrapper">
<div id="banner"><img src="museum.jpg" width="600px" height="200px" alt="Logo" /></div>
<div id="content1">
<h1>Kosten für eine Tageskarte</h1>
<form action="museum.php" method="POST">
<p>
<label>Anzahl der Erwachsenen und Senioren</label>
<input name="azahl" type="Text" class="text"/><span>* 10 EUR/Person</span>
</p>
<p>
<label>Anzahl der Kinder und Jugendlichen</label>
<input name="bzahl" type="Text" class="text" /><span>* 7 EUR/Person</span>
</p>
<p>
<input name="Reset" type="reset" value="Reset" /> <input name="Submit" type="Submit" value="Berechnen" />
</p>
</form>
</div>
<div id="content2">
<br />
<span>Die Kosten für Ihre Tageskarte</span><br />
<span>im maritimen Museum (Hamburg) betragen für</span><br /><br />
<span><strong><?php echo $azahl; ?> Erwachsene/Senioren und</strong></span><br />
<span><strong><?php echo $bzahl; ?> Kinder/Jugendliche insgesamt</strong></span><br />
<h1><?php echo $ergebnis; ?> Euro.</h1>
</div>
</body>
</html>