最近,我对我的javascript代码进行了更改,只是一个简单的联系表单,也使用了colorbox插件。它启动并运行了5天。在前两天,我收到了来自表单的电子邮件,之后我对代码进行了更改,导致没有收到用户的表单数据。从那时起,我没有收到任何电子邮件。有没有办法仍然检索和恢复从表单发送的数据?
if (isset($_POST['register-form'])) {
$_POST = array_map('htmlentities', $_POST);
if ($_POST['type'] == '1') {
$status = "Professional";
}
if ($_POST['type'] == '2') {
$status = "Student";
}
/** Make the mail **/
$headers = "from: noreply@sample.com\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$subject = "Registration";
$mail = "<table border='0' width='100%' cellpadding='5' cellspacing='1'>
<tr>
<td witdth='15%'><strong>First Name</strong></td>
<td>{$_POST['first-name']}</td>
</tr>
<tr>
<td><strong>Last Name</strong></td>
<td>{$_POST['last-name']}</td>
</tr>
<tr>
<td><strong>Contact Number</strong></td>
<td>{$_POST['contact-number']}</td>
</tr>
<tr>
<td><strong>E-mail</strong></td>
<td>{$_POST['email']}</td>
</tr>
<tr>
<td><strong>Level</strong></td>
<td>{$status}</td>
</tr>
<tr>
<td><strong>Company/School</strong></td>
<td>{$_POST['company-name']}</td>
</tr>
</table>";
mail('sample91@gmail.com', $subject, $mail, $headers);
}