我在启动项目时遇到查询问题。它说
解析错误:语法错误,C:\Users\ahmed\Documents\zadacaveb\Call Center\Dateof_seminars\forma.php第 34 行中出现意外的“$sql”(T_VARIABLE)
当我按下按钮 Dodaj (engl.添加)。我没有看到我的查询有问题,所以如果你看到我的查询中哪里有错误,请告诉我。我将展示我的forma代码.php这是一个问题,以及来自文件索引.php和删除.php的代码。这两个文档工作正常,但问题是形式上的.php
索引.php
<?php
require('../util/session.php');
require('../util/db.php');
require('../Frontend/header.php');
require('../Frontend/footer.php');
if(!isset($_SESSION['user'])) {
header('Location: /Call Center/Login/index.php');
}
$stmt = $db->query('SELECT * FROM dateof_seminars');
$rows = $stmt->fetchAll();
echo $header;
?>
<br/>
<br/>
<div class="container">
<a href="/Call Center/Dateof_seminars/forma.php" class="btn btn-primary mt-3 mb-3 float-left">Dodaj</a>
<br/>
<br/>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Počinje datuma</th>
<th scope="col">Završava datumom</th>
<th scope="col">Instruktor ID</th>
<th scope="col">Seminar ID</th>
<th scope="col">Klijent ID</th>
</tr>
</thead>
<tbody>
<?php foreach($rows as $row) { ?>
<tr>
<th scope="row"><?php echo $row['id']; ?></th>
<td><?php echo $row['date_from']; ?></td>
<td><?php echo $row['date_to']; ?></td>
<td><?php echo $row['instructor_id']; ?></td>
<td><?php echo $row['seminars_id']; ?></td>
<td><?php echo $row['clients_id']; ?></td>
<td>
<a class="btn btn-primary" href="/Call Center/Dateof_seminars/forma.php?id=<?php echo $row['id']; ?>">Edit</a>
<a class="btn btn-danger" href="/Call Center/Dateof_seminars/delete.php?id=<?php echo $row['id']; ?>">Delete</a>
</tr>
<?php } ?>
</tbody>
</table>
</center>
</div>
<?php
echo $footer;
?>
开心每一天1111
杨魅力