我正在尝试使用 isset() 在 PHP 中可视化变量,当我不使用它时,会出现一条通知,说该索引未定义。
我正在尝试使用上述函数输出表格中的变量,但使用它,表格不输出任何值。
[
<?php
// Include config file
require_once "config.php";
// Attempt select query execution
$sql = "SELECT * FROM courses";
if($result = $pdo->query($sql)){
if($result->rowCount() > 0){
echo "<table class='table table-bordered table-striped'>";
echo "<thead>";
echo "<tr>";
echo "<th>#</th>";
echo "<th>Enquiry ID</th>";
echo "<th>Course Name</th>";
echo "<th>Course Level</th>";
echo "<th>Action</th>";
echo "</tr>";
echo "</thead>";
echo "<tbody>";
我期望包含在数据库表中的值的输出,但字段仍为空白。
斯蒂芬大帝
弑天下