- Code: Select all
<?php
// kurze Variablennamen erstellen
$tirqety = $_Post['tirqety'];
$oilqty = $_Post['oilqty'];
$sparkqty = $_Post['sparkqty'];
?>
<html>
<head>
<title>Bob's Auto Parts - Ihre Bestellung</title>
</head>
<body>
<h1>Bob's Auto Parts</h1>
<h2>Ihre Bestellung</h2>
<?
$totalqty = 0;
$totalqty = $tireqty + §oilqty +$ sparkqty;
echo 'Bestellte Artikel: '.$totalqty.'<br />';
$totalamount = 0.00;
define('Tireprice', 100);
define('Oilprice', 10);
define('sparkprice', 4);
$totalamount = $tirqety * Tireprice
+ $oilgqty * Oilprice
+ $sparkqty * Sparkrprice
echo 'Zwischensumme: € '.number_format($totalamount,2).'<br />';
$taxrate = 0.10; // 10% MwSt
$totalamount = $totalamamount * (1 +$taxrate);
echo 'Summe inklusiv Steuer: €'. number_form
<?php
setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
echo '<p>Bestellung ausgeführt am ';
echo strftime("%d %B, %H:%M Uhr");
echo '</p>';
echo '<p>Ihre Bestellung: </p>';
echo $tirqety .'Reifen<br />';
echo $oilqty .'Öl<br />';
echo $sparkqty .'Zündkerzen<br />';
</head>
</body>
Könnt ihr mir vielleicht sagen was hier falsch ist!?
Denn wenn ich diesen Script im Browser aufrufe, kommt diese
Fehlermeldung:"Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in C:\xampp\htdocs\test\processorder.php on line 19"!
Danke