【发布时间】:2015-04-12 21:32:16
【问题描述】:
我知道我可以添加这个:
<form>
Search Google:
<input type="search" name="googlesearch">
</form>
但这只会让我搜索谷歌。
我希望人们能够在此列表中搜索名称。 http://graphicambi.tk/onlineemployees.html
我该怎么做?
还有
我不知道该放在哪里 太……
这是我的代码的一部分:
}
$sql = "SELECT userID, users_name, usertype, status FROM tbluseraccounts";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
if($row["status"] == "Online"){
$tcolor = "green";
}
elseif($row["status"] == "Offline"){
$tcolor = "red";
}
echo "<br>ID: " . $row["userID"]. " <br> Name: " . $row["users_name"]. " <br> Account Type: " . $row["usertype"]. " <br> Status: <font color='".$tcolor."'>" . $row["status"]. "</font><br>";
}
} else {
echo "0 results";
}
在哪里说:
echo "<br>ID: " . $row["userID"]. " <br> Name: " . $row["users_name"]. " <br> Account Type: " . $row["usertype"]. " <br> Status: <font color='".$tcolor."'>" . $row["status"]. "</font><br>";
我想在那里创建边框,所以当您访问此网站时http://graphicambi.tk/onlineemployees.html 每个帐户名称周围都会有一个黑色边框
谢谢。
【问题讨论】:
-
你知道他们可以使用浏览器的 ctrl+f 查找
-
是的。只是想 id 尽量让他们更容易哈哈。