如何使用Index.php上的鏈接顯示我的Search.php頁面的結果?Search.php鏈接結果
<a href="search.php?country_select=spain">Spain</a>
上述不起作用,所有國家都顯示在Search.php。對不起,我是PHP和MySQL的新手。
我的鏈接位於index.php上,用於搜索並顯示在search.php上。我有search.php中下面的代碼:
<?php $appmt = $bsiCore->ClearInput(base64_decode($_REQUEST['appmt_id']));
$apartDetails = $bsiCore->getApartmentdetails($rowappt['appmt_id']);
$featuresarr = $bsiCore->getApmtFeatures($rowappt['appmt_id']);
?>
<div class="col-md-4 col-sm-6 single listing">
<div class="offer offer-wrap">
<img class="img-responsive" src="<?php echo ($rowappt['default_img']=="")? "http://www.placehold.it/800x450/ddd/bbb&text=Image":"gallery/ApartImage/".$rowappt['default_img']; ?>" alt="">
<span class="label label-info">
<?php echo $rowappt['country']; ?>
</span>
<div class="btn-group">
<a href="<?php echo str_replace(" ","-",strtolower(trim($rowappt['appmt_name'])))."-".$rowappt['appmt_id'].".html"; ?>"><button class="btn btn-success btn-sm" type="button">Details</button>
<button class="btn btn-default btn-sm" type="button"><em class="icon-info-sign"></em></button></a>
</div>
<div class="padding img1">
<h2 class="text-center text-info"><?php echo $rowappt['city']; ?></h2>
<h4 class="text-center"><?php echo $rowappt['bedroom']; ?> bedroom, <?php echo $rowappt['bathroom']; ?> bathroom</h4>
<span class="label2 label-info">
<?php echo $bsiCore->config['conf_currency_symbol'].$rowappt['price']; ?><span>p/w*
</span>
</div>
</div>
</div>
形式如下:
<form action="search.php" class="form-inline reservation-horizontal clearfix" role="form" method="post" name="form1" id="form1" style="padding-bottom:0px">
<div class="row">
<div class="col-lg-12" style="min-height: 60px; background-color: rgba(255, 255, 255, 0.4); border-radius: 5px;">
<div class="pad1 col-md-2 col-sm-3 col-xs-12">
<select name="country_select" id="drop_1">
<option value="" selected="selected">All Countries</option>
</select>
</div>
<div>
<div class="pad1 col-md-2 col-sm-3 col-xs-12">
<select name="country_select">
<option value="" selected="selected" disabled="disabled">Any City/Town</option>
</select> </div></div>
<div class="pad1 col-md-2 col-sm-3 col-xs-12">
<select id="appartment_type" name="appartment_type">
<?php echo $bsiCore->getApmtTypeCombobox();?>
</select>
</div>
<div class="pad1 col-md-2 col-sm-3 col-xs-12">
<select name="bathroom" id="bathroom" >
<option value="">Sleeps</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="See Description">16+</option>
</select>
</div>
<div class="pad1 col-md-2 col-sm-3 col-xs-12">
<button value="Search" class="btn btn-success" style="width: 100%;">Search</button>
</div>
</div>
</div>
</div>
</form>
你需要添加search.php的代碼 - 不知道它是什麼,沒有人能回答你的問題! – 2014-10-16 21:39:12