【发布时间】:2014-05-05 09:00:56
【问题描述】:
编辑:在这里回答:Google Chrome Bug - Overflow:auto | scroll doesn't work
我的溢出滚动条没有出现在我的结果 page.php 中。我已经检查了错误,例如不包括高度以及班级,但我一无所获。也许是 php 搞砸了?
您可以前往http://biketurtle.co/search.php 自己查看问题 并在 'Antrim' 寻找价格低于 1000 欧元的自行车
这是 CSS 类:
.textarea
{
height: 848px;
padding-right: 20px;
padding-left: 20px;
list-style: none;
overflow:scroll;
position:relative;
}
这里是一些 HTML:
<section class="section">
<div class="textarea">
<h1>Search</h1>
<?php
if($_SERVER['REQUEST_METHOD']=='POST')
{
include("db_connect.php");
$sql = "SELECT brand,model,type,town,location,university,price,cond,description FROM placead WHERE price < ? AND location = ?";
if($stmt = $link->prepare($sql))
{
$stmt->bind_param('is', $_POST['price'], $_POST['location']);
$stmt->execute();
$stmt- >bind_result($brand,$model,$type,$town,$location,$university,$price,$condition,$description );
/* store result */
$stmt->store_result(); //required to get num_rows
echo"==============================================================";
echo "<br/>";
echo "<br/>";
printf("Your search returned : %d records <br/>", $stmt->num_rows);
echo "<br/>";
echo"==============================================================";
/* fetch values */
while ($stmt->fetch()) {
echo "<br />Price.................................".$price." Euro.";
echo "<br />location..............................".$location;
echo "<br />Brand.................................".$brand;
echo "<br />Model.................................".$model;
echo "<br />Type..................................".$type;
echo "<br />Town..................................".$town;
echo "<br />University............................".$university;
echo "<br />Condition.............................".$condition;
echo "<br/>";
echo "<br/>";
echo "<br /> Description ";
echo "<br/>";
echo "<br/>".$description;
echo "<br/>";
echo"==============================================================";
}
//close the crecordset
$stmt->close();
}
$link->close();
}
else {
?>
// contd......
【问题讨论】:
-
显示呈现的 html,而不是 php 代码。
-
“查看源代码”中呈现的 html 非常混乱。页面在这里:biketurtle.co/search.php 只需搜索 location = 'Antrim' 和 price
-
"
-
感谢 po4teda!原来的问题仍然存在。
-
完整代码在这里:jsfiddle.net/53qs5Handy site。