我正在制作一个小网站,但它说的是http 500故障。我知道那是错的。但我看起来像100次,什么都没有。所以,我想问你们,我做错了什么?
<?php
error_reporting(0);
mysql_connect("localhost", "apexgame_root", "apex17") or die(mysql_error());
mysql_select_db("apexgame_voorraad") or die(mysql_error());
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['1']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['1'] = $row['naam'];
$prijs['1'] = $row['prijs'];
$aantal['1'] = $_GET['1a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['2']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['2'] = $row['naam'];
$prijs['2'] = $row['prijs'];
$aantal['2'] = $_GET['2a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['3']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['3'] = $row['naam'];
$prijs['3'] = $row['prijs'];
$aantal['3'] = $_GET['3a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['4']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['4'] = $row['naam'];
$prijs['4'] = $row['prijs'];
$aantal['4'] = $_GET['4a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['5']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['5'] = $row['naam'];
$prijs['5'] = $row['prijs'];
$aantal['5'] = $_GET['5a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['6']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['6'] = $row['naam'];
$prijs['6'] = $row['prijs'];
$aantal['6'] = $_GET['6a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['7']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['7'] = $row['naam'];
$prijs['7'] = $row['prijs'];
$aantal['7'] = $_GET['7a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['8']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['8'] = $row['naam'];
$prijs['8'] = $row['prijs'];
$aantal['8'] = $_GET['8a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['9']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['9'] = $row['naam'];
$prijs['9'] = $row['prijs'];
$aantal['9'] = $_GET['9a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['10']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['10'] = $row['naam'];
$prijs['10'] = $row['prijs'];
$aantal['10'] = $_GET['10a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['11']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['11'] = $row['naam'];
$prijs['11'] = $row['prijs'];
$aantal['11'] = $_GET['11a'];
$result = mysql_query("SELECT * FROM voorraad WHERE id = '".$_GET['12']."'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$naam['12'] = $row['naam'];
$prijs['12'] = $row['prijs'];
$aantal['12'] = $_GET['12a'];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- generator meta tag -->
<!-- leave this for stats and Silex version check -->
<meta name="generator" content="Silex v2.2.7">
<!-- End of generator meta tag -->
<script type="text/javascript" src="//editor.silex.me/static/2.7/jquery.js" data-silex-static=""></script>
<script type="text/javascript" src="//editor.silex.me/static/2.7/jquery-ui.js" data-silex-static=""></script>
<script type="text/javascript" src="//editor.silex.me/static/2.7/pageable.js" data-silex-static=""></script>
<script type="text/javascript" src="//editor.silex.me/static/2.7/front-end.js" data-silex-static=""></script>
<link rel="stylesheet" href="//editor.silex.me/static/2.7/normalize.css" data-silex-static="">
<link rel="stylesheet" href="//editor.silex.me/static/2.7/front-end.css" data-silex-static="">
<style type="text/css" class="silex-style"></style>
<script type="text/javascript" class="silex-script"></script>
<style class="silex-inline-styles" type="text/css">
.body-initial {
background-color: rgba(255, 255, 255, 1);
}
.silex-id-1491122170224-3 {
min-height: 489px;
width: 740px;
background-color: rgb(255, 255, 255);
top: 159px;
left: 441px;
border-style: dotted;
}
.silex-id-1491122314271-5 {
min-height: 98px;
width: 114px;
background-color: rgb(255, 255, 255);
top: 5px;
left: 5px;
border-style: double;
}
.silex-id-1491122337071-6 {
min-height: 100px;
width: 100px;
top: 10px;
left: 15px;
}
.silex-id-1491122371440-7 {
min-height: 465px;
width: 560px;
background-color: rgb(255, 255, 255);
top: 12px;
left: 165px;
}
.silex-id-1491121994431-1 {
min-height: 100px;
width: 269px;
top: 64px;
left: 682px;
}
.silex-id-1491121861001-0 {
min-height: 100px;
width: 204px;
top: 13px;
left: 709px;
}
.silex-id-1491122238963-4 {
min-height: 126px;
width: 234px;
top: 21px;
left: 946px;
}
.silex-id-1491122107871-2 {
min-height: 100px;
width: 248px;
top: 19px;
left: 450px;
}
</style>
<title></title>
<script type="text/javascript" class="silex-json-styles">
[{"desktop":{"body-initial":{"background-color":"rgba(255,255,255,1)"},"silex-id-1474394621033-3":{"min-height":"600px","top":"5px","left":"0px"},"silex-id-1474394621032-2":{"min-height":"100px","background-color":"rgb(255, 255, 255)"},"silex-id-1474394605264-1":{"min-height":"100px","width":"100px","top":"100px","left":"100px"},"silex-id-1474394605263-0":{"min-height":"100px","background-color":"transparent"},"silex-id-1442914737143-3":{"min-height":"36px","width":"960px","top":"37px","left":"1px"},"silex-id-1491121861001-0":{"min-height":"100px","width":"204px","top":"13px","left":"709px"},"silex-id-1491121994431-1":{"min-height":"100px","width":"269px","top":"64px","left":"682px"},"silex-id-1491122107871-2":{"min-height":"100px","width":"248px","top":"19px","left":"450px"},"silex-id-1491122170224-3":{"min-height":"489px","width":"740px","background-color":"rgb(255, 255, 255)","top":"159px","left":"441px","border-style":"dotted"},"silex-id-1491122238963-4":{"min-height":"126px","width":"234px","top":"21px","left":"946px"},"silex-id-1491122314271-5":{"min-height":"98px","width":"114px","background-color":"rgb(255, 255, 255)","top":"5px","left":"5px","border-style":"double"},"silex-id-1491122337071-6":{"min-height":"100px","width":"100px","top":"10px","left":"15px"},"silex-id-1491122371440-7":{"min-height":"465px","width":"560px","background-color":"rgb(255, 255, 255)","top":"12px","left":"165px"}},"mobile":{},"componentData":{}}]
</script>
<style id="current-page-style">
.page-page-1 {
display: inherit;
}
</style>
<!-- Silex HEAD tag do not remove -->
<!-- End of Silex HEAD tag do not remove -->
</head>
<body data-silex-id="body-initial" class="body-initial silex-runtime" data-silex-type="container">
<div class="silex-pages">
<div data-silex-type="image" class="editable-style silex-id-hamburger-menu image-element menu-button prevent-draggable prevent-resizable" data-silex-id="silex-id-hamburger-menu">
<img alt="open mobile menu" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAoCAYAAAC8cqlMAAAB5UlEQVR42u2ZPWvCUBSGM+UfFO3e3dLu/QN+oKj4EUXRQREEJYgoiCAu6qCogyDo7iJ21UUaKqEgCC4iiEMGB3UVgsnpTWj/wfVK2nvhGbKEPJyT996TMMzPGg6H5mKx+GgkyuWyeTQasb8OTDwef4tEIp8+n+/LYIjJZJJHQiwzm81M6OLDarWqNpsNjEYgEJCy2ewT0+/3TagighElNFAnQT6ft1ARKkJFqMgfFvF4PFpuEwFtdrcRqVarIIoirFYrIiyXSxiPx+B2u/GJBINBuF6vQHopigK1Wg2fCMdxcLlciIuoqgqNRgOfiN1uB3Qwg91uB8fjkQiHwwEmkwne1qLxS0VuKKJle71eh06nQ4Rmswk8z+MVcTqdsNlsQJZlotF7Pp8hk8ngE4lGo/qN7xG/vV4Pb0Xm8zlxkdPpBGgMx/+yJxIJKBQKRMjlcuBwOGhq/Q+RcDgMsViMCFrAuFwu/CKDwQC22y1IkkSE/X4PgiDo+xc2Ea0S9zjGa/Hb7Xbxifj9fj0K7yFSqVTwtlY6nYbpdKpPiSRYLBbQarX0PYymFhWhIlSEilCRW6GdyUqlkoVZr9dsKpXiOY6TtW+7BkNBz/7ebrcf9L+6Xq+XRYPMMyrTq5EIhUIvaAjTJb4BBNQ2yhnth0wAAAAASUVORK5CYII="
class="silex-element-content">
</div>
<a id="page-page-1" data-silex-type="page" class="page-element page-link-active">Page 1</a></div>
<div data-silex-type="container" class="editable-style silex-id-1491122170224-3 container-element" data-silex-id="silex-id-1491122170224-3">
<div data-silex-type="container" class="editable-style silex-id-1491122314271-5 container-element" data-silex-id="silex-id-1491122314271-5">
<div data-silex-type="text" class="editable-style silex-id-1491122337071-6 text-element" data-silex-id="silex-id-1491122337071-6">
<div class="silex-element-content normal">Datum:
<div><?php echo date("l jS \of F Y h:i:s A"); ?></div>
</div>
</div>
</div>
<div data-silex-type="html" class="editable-style silex-id-1491122371440-7 html-element" data-silex-id="silex-id-1491122371440-7">
<div class="silex-element-content">
<p>Aantal producten: <?php echo $_GET['aantal']; ?></p><br /><hr>
<?php
echo $naam['1'] . ' - ' . $prijs['1'] 'Euro per stuk - Aantal:' . $aantal['1'] ' - Totaal:' . $prijs['1']*$aantal['1'] . '<br />';
echo $naam['2'] . ' - ' . $prijs['2'] 'Euro per stuk - Aantal:' . $aantal['2'] ' - Totaal:' . $prijs['2']*$aantal['2'] . '<br />';
echo $naam['3'] . ' - ' . $prijs['3'] 'Euro per stuk - Aantal:' . $aantal['3'] ' - Totaal:' . $prijs['3']*$aantal['3'] . '<br />';
echo $naam['4'] . ' - ' . $prijs['4'] 'Euro per stuk - Aantal:' . $aantal['4'] ' - Totaal:' . $prijs['4']*$aantal['4'] . '<br />';
echo $naam['5'] . ' - ' . $prijs['5'] 'Euro per stuk - Aantal:' . $aantal['5'] ' - Totaal:' . $prijs['5']*$aantal['5'] . '<br />';
echo $naam['6'] . ' - ' . $prijs['6'] 'Euro per stuk - Aantal:' . $aantal['6'] ' - Totaal:' . $prijs['6']*$aantal['6'] . '<br />';
echo $naam['7'] . ' - ' . $prijs['7'] 'Euro per stuk - Aantal:' . $aantal['7'] ' - Totaal:' . $prijs['7']*$aantal['7'] . '<br />';
echo $naam['8'] . ' - ' . $prijs['8'] 'Euro per stuk - Aantal:' . $aantal['8'] ' - Totaal:' . $prijs['8']*$aantal['8'] . '<br />';
echo $naam['9'] . ' - ' . $prijs['9'] 'Euro per stuk - Aantal:' . $aantal['9'] ' - Totaal:' . $prijs['9']*$aantal['9'] . '<br />';
echo $naam['10'] . ' - ' . $prijs['10'] 'Euro per stuk - Aantal:' . $aantal['10'] ' - Totaal:' . $prijs['10']*$aantal['10'] . '<br />';
echo $naam['11'] . ' - ' . $prijs['11'] 'Euro per stuk - Aantal:' . $aantal['11'] ' - Totaal:' . $prijs['11']*$aantal['11'] . '<br />';
echo $naam['12'] . ' - ' . $prijs['12'] 'Euro per stuk - Aantal:' . $aantal['12'] ' - Totaal:' . $prijs['12']*$aantal['12'] . '<br />';
?>
</div>
</div>
</div>
<div data-silex-type="text" class="editable-style silex-id-1491121994431-1 text-element" data-silex-id="silex-id-1491121994431-1">
<div class="silex-element-content normal"><b style="font-family: verdana, sans-serif; font-size: xx-large;">AlleenGadgets</b></div>
</div>
<div data-silex-type="text" class="editable-style silex-id-1491121861001-0 text-element" data-silex-id="silex-id-1491121861001-0">
<div class="silex-element-content normal">
<font size="7" face="Roboto Condensed"><b>PLAKBON</b></font>
</div>
</div>
<div data-silex-type="text" class="editable-style text-element silex-id-1491122238963-4" data-silex-id="silex-id-1491122238963-4">
<div class="silex-element-content normal">
<div>
<font size="4">Aan:</font>
</div>
<font size="4">
<div>
<font size="4"><br></font>
</div><?php echo $_GET['straat']; ?></font>
<div>
<font size="4"><?php echo $_GET['postcode']; ?></font>
</div>
<div>
<font size="4"><?php echo $_GET['plaats']; ?></font>
</div>
<div>
<font size="4"><?php echo $_GET['land']; ?></font>
</div>
</div>
</div>
<div data-silex-type="text" class="editable-style silex-id-1491122107871-2 text-element" data-silex-id="silex-id-1491122107871-2">
<div class="silex-element-content normal">
<div>
<font size="4">Van:</font>
</div>
<font size="4">
<div>
<font size="4"><br></font>
</div>Burgemeester Perksingel 28</font>
<div>
<font size="4">1761CM</font>
</div>
<div>
<font size="4">Anna Paulowna</font>
</div>
<div>
<font size="4">Nederland</font>
</div>
</div>
</div>
</body>
</html>
答案 0 :(得分:-1)
你在这里遗漏了一些东西:
echo $naam['1'] . ' - ' . $prijs['1'] 'Euro per stuk - Aantal:'
(在第220行)
应该是:
echo $naam['1'] . ' - ' . $prijs['1'] . 'Euro per stuk - Aantal:'
此错误也在de next lines ..