[ad_1]
PHP
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $crime_type = $_POST['search']; $sql = "select * from criminal_tbl where crime_type=:crime_type order by case_no DESC"; $stmt = $con->prepare($sql); $stmt->bindParam('crime_type',$crime_type); $stmt->execute(); $stmt->setFetchMode(PDO::FETCH_ASSOC); while ($row = $stmt->fetch()){ echo" <table border="3" style="width: 100%; height: 100%"><tbody><tr align="center"> <td> </td> <td> Information</td> <td>Identity </td> <td> Date of Birth </td> <td> <span class="fa fa-eye"></span> </td> </tr> </tbody></table> "; } ?>
我尝试过的:
它显示表格但没有边框请帮助我
解决方案1
引用:它向我展示了表格
你确定吗 ?
清洁后:
PHP
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $crime_type = $_POST['search']; $sql = "select * from criminal_tbl where crime_type=:crime_type order by case_no DESC"; $stmt = $con->prepare($sql); $stmt->bindParam('crime_type',$crime_type); $stmt->execute(); $stmt->setFetchMode(PDO::FETCH_ASSOC); while ($row = $stmt->fetch()){ echo" <table border="3" style="width: 100%; height: 100%"> <tbody> <tr align="center"> <td> </td> <td> Information</td> <td>Identity </td> <td> Date of Birth </td> <td> <span class="fa fa-eye"></span> </td> </tr> </tbody> </table> "; } ?>
该代码产生 1 桌子 每条记录有一个 身体 本来就是一个 标头 并且缺少包含数据的实体。
先生,您的问题是关于这段代码的吗?
[ad_2]
コメント