您好,我有一个来自我购买的主题的联系表格 PHP。我一直在尝试用它制作一个定制的表格,但没有运气。尝试更改变量以适用于我自己制作的变量,但它没有发送到我希望信息发送到的电子邮件中。
这就是我的 HTML 中的内容
<form id="" action="application/application.php" method="post" class="validateform" name="send-contact">
<div id="sendmessage">
Your message has been sent. Thank you!
</div>
Youtube Channel Name <br> <input type="text" name="youtubename" placeholder="* Enter Your YouTube Name">
<div class="validation"></div>
First Name <br> <input type="text" name="firstname" placeholder="* Enter Your First Name">
<div class="validation"></div>
Last Name <br> <input type="text" name="lastname" placeholder="* Enter Your Last Name">
<div class="validation"></div>
Your Paypal Email Address <br> <input type="text" name="paypal" placeholder="* Enter Your Paypal Email">
<div class="validation"></div>
Your YouTube Email Address <br> <input type="text" name="youtubeemail" placeholder="* Enter Your YouTube Email">
<div class="validation"></div>
Skype <br> <input type="text" name="skype" ``placeholder="* Enter Your Skype Name">
<div class="validation"></div>
<button class="btn btn-theme margintop10 pull-left" type="submit">Submit Application</button>
</form>
对于我的 PHP,我有以下内容;
<?php
include 'config.php';
error_reporting (E_ALL ^ E_NOTICE);
$post = (!empty($_POST)) ? true : false;
if($post)
{
$youtubename = stripslashes($_POST['youtubename']);
$firstname = stripslashes($_POST['firstname']);
$lastname = stripslashes($_POST['lastname']);
$paypal = stripslashes($_POST['paypal']);
$youtubeemail = trim($_POST['youtubeemail']);
$skype = stripslashes($_POST['skype']);
$error = '';
if(!$error)
{
$mail = mail(WEBMASTER_EMAIL, $subject, $message
"From: ".$firstname." <".$youtubename.">\r\n"
."Reply-To: ".$youtubeemail."\r\n"
."X-Mailer: PHP/" . phpversion());
if($mail)
{
echo 'OK';
}
}
}
?>
在我的 config.php 我有
<?php
// To
define("WEBMASTER_EMAIL", 'Support@XvinityNetwork.com');
?>
我对 HTML 不是很精通,我的一名员工在做这件事,但是有一个紧急问题需要处理,我需要启动并运行这个联系表。我确实有主题附带的默认表单,它工作得很好,所以我猜我在这里做错了什么。将不胜感激!