用户从选择框中选择一个值,然后通过表单传递给另一个页面,该页面应该显示该选择的mysql记录.这没有显示任何结果,但是值肯定会被传递,因为它可以被回显.
<?php
include("top.php");
$db = getConnection();
$eventID = $_POST['eventID'];
echo $eventID;
$queryEvent = $db->query("SELECT * FROM projectEvent WHERE eventID = '$eventID'");
$queryEvent->setFetchMode(PDO::FETCH_ASSOC);
$record = $queryEvent->fetchALL();
?>
<form name="form1" id="form1" method="post" action="deleteOpen.php">
<p> are you sure you want to delete the following Open Day? </p>
<table width="200" cellpadding="0" cellspacing="0">
<tr>
<th scope="row">eventID</th>
<td><?php echo $record -> eventID; ?></td>
</tr>
<tr>
<th scope="row">propertyID</th>
<td><?php echo $record -> propertyID; ?></td>
</tr>
<tr>
<th scope="row">eventDate</th>
<td><?php echo $record -> eventDate; ?></td>
</tr>
<tr>
<th scope="row">eventTime</th>
<td><?php echo $record -> eventTime; ?></td>
</tr>
<tr>
<th scope="row">eventDescription</th>
<td><?php echo $record -> eventDescription; ?></td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
任何人都可以建议为什么表中没有显示这些值?
谢谢
error_reporting(E_ALL);在你的脚本中看到这些愚蠢的错误.| 归档时间: |
|
| 查看次数: |
96 次 |
| 最近记录: |