如何修改我的$select
函數以允許客戶在搜索文本中鍵入並單擊「搜索」時使用數據庫進行搜索?我還希望能夠輸入表單域,並且PHP會自動用表單數據動態更新頁面,並能夠定義要在數據庫中搜索的域!
這讓我查看我的客戶表:
$select = $db->query("SELECT * FROM customers ORDER BY id DESC");
<?php
if (!$select->num_rows) {
echo '<p>', 'No records', '</p>';
}else{
?>
<table border="1" width="100%">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<?php
while ($row = $select->fetch_object()) {
?>
<tr>
<td><?php echo $row->FName;?></td>
<td><?php echo $row->LName;?></td>
'獎勵積分':你將如何給我們這些? :P – 2015-04-01 17:53:27
一旦我獲得了足夠的「聲譽」,我將回到有幫助的人的答案,並upvote :) – Steven 2015-04-02 13:25:59