我遇到了一个简单的html表单,将一些值发送到php脚本。这个表格和脚本立刻起作用,但现在我不知道发生了什么。我确实有一些愚蠢的价值命名问题,但自从纠正这些问题以后,它仍然一样破碎。
以下是表格:
<form action="form-to-email.php" method="POST">
Hey Luke!<br><br>
My name is <input type="text" name="name" placeholder="your name">. I like your work. I'm looking for someone to to fill a position with skills in the following areas:<br><br>
<div class="checkboxes">
<div class="leftcheckboxes">
<input type="checkbox" name="skillneeded" value="uxdesign">UX Design<br>
<input type="checkbox" name="skillneeded" value="uidesign">UI Design<br>
<input type="checkbox" name="skillneeded" value="interactiondesign">IxD<br>
</div>
<div class="rightcheckboxes">
<input type="checkbox" name="skillneeded" value="graphicdesign">Graphics<br>
<input type="checkbox" name="skillneeded" value="webanimation">Web Animation<br>
<input type="checkbox" name="skillneeded" value="frontend">Front End<br><br>
</div>
</div>
Let me know if you'd like to come in to talk shop and discuss your eligibility for the position further in person. <br><br>
<textarea name="furtherdetails" placeholder=" further information" cols="40" rows="7"></textarea><br><br>
You can reach me at <input type="text" name="email" placeholder="your email">
<br><br><br>
<div class="submitbuttwrapper">
<input type="submit" value="Submit">
</div>
</form>
这是php脚本
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
set_error_handler("var_dump");
//grab the values posted to the header and put them in vars
$name = $_POST['name'];
$furtherdetails = $_POST['furtherdetails'];
$email = $_POST['email'];
$skills = nl2br(implode(',', $_POST['skillneeded']));
$email_from = "$email";
$email_subject = "new form submission";
$email_body = "You received a new message from $name.\n\n".
"$furtherdetails.\n\n".
"$email.\n\n".
"$skills";
$to = "luke.ryckman@gmail.com";
$headers = "From: $email \r\n";
mail($to, $email_subject, $email_body, $headers);
header('Location: http://www.lukeryckman.ca/thank-you.html');
?>
我不知道为什么当它曾经做过时这不起作用 - 任何帮助表示赞赏。谢谢。