我为我的高中项目创建了某种网上商店。构建一个过滤器系统后,它会搜索我的数据库并在我自己编写的类产品加载器的帮助下加载它们。
为了设置Ive与$_GET
合作的filtervariables。一切在我的本地主机上都运行良好,但是当上载到我的高中所构成的服务器时,只有我“需要”的标头可以单独工作,但其他任何东西都无法加载。
可能是服务器不允许使用$_GET
方法吗?
<?php
$current_page = 'Webshop.php';
require 'header.php';
require 'includes\productloader.inc.php';
?>
<body>
<form method="get"action="Webshop.php">
<aside class="EDside">
<div class="Filtersidebar">
<h1>Filter</h1>
<ul class="Filter">
<li><a>Max. Höhe</a></li>
<li><a>Max. Breite</a></li>
<li><a>Max. Tiefe</a></li>
<li><a>Metallart</a></li>
<li><a>Max. Preis</a></li>
<li><input type="text" name="Höhe" value=""></li>
<li><input type="text" name="Breite" value=""></li>
<li><input type="text" name="Tiefe" value=""></li>
<li><select id="Metallart" name="Metallart">
<option value=""></option>
<option value="Bronze">Bronze</option>
<option value="Messing">Messing</option>
<option value="Kupfer">Kupfer</option>
<option value="Edelstahl">Edelstahl</option>
<option value="Aluminium">Aluminium</option>
<option value="Rostig">Rostig</option>
</select></li>
<li><input type="text" name="Preis" value=""></li>
</ul>
</div>
<div>
<a href = Webshop.php><button>Zurücksetzen</button></a>
<button type ="submit" >Anwenden</button>
</div>
</aside>
</form>
<?php
if(isset($_GET['Höhe'])){
$maxhöhe;
if(!$_GET['Höhe']=="")
$maxhöhe = $_GET['Höhe'];
else
$maxhöhe = null;
if(!$_GET['Breite']=="")
$maxbreite = $_GET['Breite'];
else
$maxbreite = null;
if(!$_GET['Tiefe']=="")
$maxtiefe = $_GET['Tiefe'];
else
$maxtiefe = null;
$metallart;
if(!$_GET['Metallart']=="")
$metallart = $_GET['Metallart'];
else
$metallart = null;
$maxpreis;
if(!$_GET['Preis']=="")
$maxpreis = $_GET['Preis'];
else
$maxpreis = null;
if($maxhöhe == null && $maxbreite == null && $maxtiefe == null && $metallart == null && $maxpreis == null)
$loader = productloader::withoutstatement();
else
$loader = productloader::withstatement($maxhöhe,$maxbreite,$maxtiefe,$metallart,$maxpreis);
}
else
$loader = productloader::withoutstatement();
$productcount = count($loader->products);
?>
<?php
if($productcount>0){
echo '
<section class="EDSection">
<ul class="Skulptur">
<li> <div class = "SBox">
<div class="angebote">
<div class="angebot-bild">
<a href="showproduct.php?id='.$loader->products[0]->productid.'"><img class="a01" src="showimage.php?id='.$loader->products[0]->imgid.'" /></a>
</div>
<div class="angebot-text">
<h1>'.$loader->products[0]->productname.'</h1>
</div>
<div class="angebot-preis">
<p>'.$loader->products[0]->preis.' EUR</p>
</div>
</div>
</div>
</li>
';
}
if($productcount>1){
echo '
<li><div class = "SBox">
<div class="angebote">
<div class="angebot-bild">
<a href="showproduct.php?id='.$loader->products[1]->productid.'"><img class="a01" src="showimage.php?id='.$loader->products[1]->imgid.'" /></a>
</div>
<div class="angebot-text">
<h1>'.$loader->products[1]->productname.'</h1>
</div>
<div class="angebot-preis">
<p>'.$loader->products[1]->preis.' EUR</p>
</div>
</div>
</div>
</li>
';
}
if($productcount>2){
echo '
<li><div class = "SBox">
<div class="angebote">
<div class="angebot-bild">
<a href="showproduct.php?id='.$loader->products[2]->productid.'"><img class="a01" src="showimage.php?id='.$loader->products[2]->imgid.'" /></a>
</div>
<div class="angebot-text">
<h1>'.$loader->products[2]->productname.'</h1>
</div>
<div class="angebot-preis">
<p>'.$loader->products[2]->preis.' EUR</p>
</div>
</div>
</div>
</li>
';
}
if($productcount>3){
echo '
<li><div class = "SBox">
<div class="angebote">
<div class="angebot-bild">
<a href="showproduct.php?id='.$loader->products[3]->productid.'"><img class="a01" src="showimage.php?id='.$loader->products[3]->imgid.'" /></a>
</div>
<div class="angebot-text">
<h1>'.$loader->products[3]->productname.'</h1>
</div>
<div class="angebot-preis">
<p>'.$loader->products[3]->preis.' EUR</p>
</div>
</div>
</div>
</li>
';
}
if($productcount>4){
echo'
<li> <div class = "SBox">
<div class="angebote">
<div class="angebot-bild">
<a href="showproduct.php?id='.$loader->products[4]->productid.'"><img class="a01" src="showimage.php?id='.$loader->products[4]->imgid.'" /></a>
</div>
<div class="angebot-text">
<h1>'.$loader->products[4]->productname.'</h1>
</div>
<div class="angebot-preis">
<p>'.$loader->products[4]->preis.' EUR</p>
</div>
</div>
</div>
</li>
';
}
if($productcount>5){
echo ' <li><div class = "SBox">
<div class="angebote">
<div class="angebot-bild">
<a href="showproduct.php?id='.$loader->products[5]->productid.'"><img class="a01" src="showimage.php?id='.$loader->products[5]->imgid.'" /></a>
</div>
<div class="angebot-text">
<h1>'.$loader->products[5]->productname.'</h1>
</div>
<div class="angebot-preis">
<p>'.$loader->products[5]->preis.' EUR</p>
</div>
</div>
</div>
</li>';
}
if($productcount>6){
echo ' <li><div class = "SBox">
<div class="angebote">
<div class="angebot-bild">
<a href="showproduct.php?id='.$loader->products[6]->productid.'"><img class="a01" src="showimage.php?id='.$loader->products[6]->imgid.'" /></a>
</div>
<div class="angebot-text">
<h1>'.$loader->products[6]->productname.'</h1>
</div>
<div class="angebot-preis">
<p>'.$loader->products[6]->preis.' EUR</p>
</div>
</div>
</div>
</li>';
}
if($productcount>7){
echo ' <li><div class = "SBox">
<div class="angebote">
<div class="angebot-bild">
<a href="showproduct.php?id='.$loader->products[7]->productid.'"><img class="a01" src="showimage.php?id='.$loader->products[7]->imgid.'" /></a>
</div>
<div class="angebot-text">
<h1>'.$loader->products[7]->productname.'</h1>
</div>
<div class="angebot-preis">
<p>'.$loader->products[7]->preis.' EUR</p>
</div>
</div>
</div>
</li>';
}
?>
</section>
<section>
<div style="text-align: center">
<ul class="pagination">
<li><a href="Webshop.php">«</a></li>
<li><a class="active" href="Webshop.php">1</a></li>
<li><a href="Angebot2.php">2</a></li>
<li><a href="Angebot3.php">3</a></li>
<li><a href="Angebot2.php">»</a></li>
</ul>
</div>
</section>
<?php
require 'footer.php';
?>
</body>
</html>