我的目标是能够通过电子邮件接受或拒绝客户的请求。我拥有的是我网站的后台,那里似乎每个提交给我的预订表格的人,提交后的客户会收到一封电子邮件,说他们的确认正在等待中,此时管理员可以选择接受或拒绝预订,完成该操作后,客户将收到一封带有回复的电子邮件。现在,我试着点击“接受”按钮,看看它是否会起作用。现在,我收到一条错误消息,指出地址无效$mail->addAddress($_POST['EmailReser']);
//File listreser.php
<body style="background-color:white;">
<?php
$sql="select * from Reservas";
$res=$lig->query($sql);
?>
<div class="container">
<h1 align="center">List Reservations</h1> <br><br>
<table id ="tableUser" class="table table-striped display">
<thead>
<tr>
<th>Code of the reservation</th>
<th>Name </th>
<th>Last Name</th>
<th>Email</th>
<th>Telephone</th>
<th>Date </th>
<th>Time</th>
<th>Number of people</th>
<th>Message </th>
<th>State</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
while ($lin=$res->fetch_array()){ ?>
<tr>
<td><?php echo$lin[Cod_Reserva]; ?></td>
<td><?php echo$lin[NomeReser]; ?></td>
<td><?php echo$lin[ApelidoReser]; ?></td>
<td><?php echo$lin[EmailReser]; ?></td>
<td><?php echo$lin[TelefoneR]; ?></td>
<td><?php echo$lin[DataR]; ?></td>
<td><?php echo$lin[Hora]; ?></td>
<td><?php echo$lin[NumPessoas]; ?></td>
<td><?php echo$lin[MensagemR]; ?></td>
<td><a style="padding-right:12px;" href=index.php?cmd=aceitar&Cod_Reserva=<?php echo $lin["Cod_Reserva"]; ?>><img src='images/check.png' width="20" height = "20" ></a><a href=index.php?cmd=rejeitar&Cod_Reserva=<?php echo $lin["Cod_Reserva"]; ?>><img src='images/close.png' width="15" height = "15" ></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
HUH函数