php表单的问题
我正在填写一张表格 我要有人到下面去填写信息 t1.html 在他们填写信息后,他们会看到一个感谢提交 (现在它转到一个php页面,显示他们输入的内容) 有人会收到一封带有php页面链接的电子邮件(“表单中的电子邮件地址”),其中包含从表单中输入的内容 收到电子邮件的人将在该php页面上接受或拒绝 我不知道如何生成php页面,因此接收电子邮件的人将能够访问表单中输入内容的信息。我该怎么做 形式php表单的问题,php,html,forms,Php,Html,Forms,我正在填写一张表格 我要有人到下面去填写信息 t1.html 在他们填写信息后,他们会看到一个感谢提交 (现在它转到一个php页面,显示他们输入的内容) 有人会收到一封带有php页面链接的电子邮件(“表单中的电子邮件地址”),其中包含从表单中输入的内容 收到电子邮件的人将在该php页面上接受或拒绝 我不知道如何生成php页面,因此接收电子邮件的人将能够访问表单中输入内容的信息。我该怎么做 形式 发送至: 电子邮件发送到的电子邮件地址: php 正文{字体系列:Helvetic
- 发送至:
-
电子邮件发送到的电子邮件地址:
php
正文{字体系列:Helvetica,Arial,无衬线;字体大小:10pt;}
表{宽度:100%;边框折叠:折叠;边框:1px实心#CCC;}
td{padding:5px;border:1px solid#CCC;border width:1px 0;}
发送至的人员姓名:
电子邮件发送至:
批准/拒绝
电子邮件php文件
<html>
<body>
<p style="font-family:Helvetica, Arial, sans-serif;font-size:"x-small";"><?php echo $post->SendingeWarrant; ?></p>
<p style="font-family:Helvetica, Arial, sans-serif;font-size:"x-small";">Click link to approve or deny: </p>
</body>
</html>
单击链接批准或拒绝:
在您的数据库中输入电子邮件数据,当收到电子邮件的人单击“接受”按钮时,它将从数据库中获取该数据。您听说过SQL吗?听说过,但不熟悉它。您肯定应该开始使用SQL。您需要学习如何将数据存储在数据库中,以便以后可以检索。有成千上万的教程,所以我不相信有人需要为你再写一篇教程。进行搜索,学习如何将数据存储在数据库中以便以后检索,如果遇到问题,请返回并提出问题。现在,我投票结束这个问题。谢谢。是的,我将结束。我不知道我需要sql
<?php
if (!empty($_POST)) {
$success = $error = false;
$post = new stdClass;
foreach ($_POST as $key => $val)
$post->$key = trim(strip_tags($_POST[$key]));
// Check for blank fields
if ( empty($post->Email))
$error = true;
else {
// Get this directory, to include other files from
$dir = dirname(__FILE__);
// Get the contents of the pdf into a variable for later
ob_start();
require_once($dir.'/pdf.php');
$pdf_html = ob_get_contents();
ob_end_clean();
// Load the dompdf files
require_once($dir.'/dompdf/dompdf_config.inc.php');
$dompdf = new DOMPDF(); // Create new instance of dompdf
$dompdf->load_html($pdf_html); // Load the html
$dompdf->render(); // Parse the html, convert to PDF
$pdf_content = $dompdf->output(); // Put contents of pdf into variable for later
// Get the contents of the HTML email into a variable for later
ob_start();
require_once($dir.'/html3.php');
$html_message = ob_get_contents();
ob_end_clean();
// Load the SwiftMailer files
require_once($dir.'/swift/swift_required.php');
$mailer = new Swift_Mailer(new Swift_MailTransport()); // Create new instance of SwiftMailer
$message = Swift_Message::newInstance()
->setSubject('eWarrant') // Message subject
->setTo(array($post->Email => $post- >SendingeWarrant)) // Array of people to send to
->setFrom(array('no-reply@henschen.com' => 'eWarrant')) // From:
->setBody($html_message, 'text/html'); // Attach that HTML message from earlier
// Send the email, and show user message
if ($mailer->send($message))
$success = true;
else
$error = true;
}
}
?>
<html>
<head>
<style>
body {font-family:Helvetica, Arial, sans-serif; font-size:10pt;}
table {width:100%; border-collapse:collapse; border:1px solid #CCC;}
td {padding:5px; border:1px solid #CCC; border-width:1px 0;}
</style>
</head>
<body>
<h1></h1>
<table>
<tr>
<td><strong>Name of person sending to:</strong></td>
<td><?php echo $_POST["SendingeWarrant"]; ?></td>
<td><strong>Email being sent to:</strong></td>
<td><?php echo $_POST["Email"]; ?></td>
</tr>
</table>
<p>Approve / Deny</p>
</body>
</html>
</body>
</html>
<html>
<body>
<p style="font-family:Helvetica, Arial, sans-serif;font-size:"x-small";"><?php echo $post->SendingeWarrant; ?></p>
<p style="font-family:Helvetica, Arial, sans-serif;font-size:"x-small";">Click link to approve or deny: </p>
</body>
</html>