i realise kind of question gets asked lot, playing around code , searching answers online has yielded nothing helpful yet, here are!
it's classic php email form when submit nothing, page reloads, no echoes, no email sent. have used other email code , email was sent, it's not hosting thing, wanted add spam verification, , nothing.
i love know i'm doing wrong.
here's code:
<?php $name = $_post['name']; $email = $_post['email']; $message = $_post['message']; $frage = $_post['frage']; $from = "from: jimzip.com questions & comments"; $to = "---removed---"; $subject = "you have question or comment jimzip.com duuude"; $body = "from: $name\n e-mail: $email\n message:\n $message"; if ($_post['submit']) { if ($name != '' && $email != '') { if ($_post['submit'] && $frage == '10') { if (mail ($to, $subject, $body, $from)) { echo "<p class='echo-message'>your message sent successfully. danke!</p>"; } else { echo "<p class='echo-message'>sorry, went wrong there. please try again?</p>"; } } else if ($_post['submit'] && $frage != '10') { echo "<p class='echo-message'>oops, looks anti-spam answer wrong. please try again.</p>"; } } else { echo "<p class='echo-message'>looks required fields empty. give try?</p>"; } } ?> <form action="index.php" method="post" id="contact-form"> <label>your name:</label> <input name="name"><br /> <label>your email address:</label> <input name="email" type="email" placeholder="" ><br /> <label>what interested in?</label> <textarea name="message" id="message-box"></textarea><br /> <section id="anti-spam-container"> <label>what 5 + 5? (anti-spam!)</label> <input name="frage" placeholder="answer" /> </section> <input id="submit-button" type="submit" name="submit" value="go, little bytes! »" /> </form>
the page , contact form can found live @ http://www.jimzip.com/sandbox/05/index.php it's @ bottom.
thanks in advance.
your submit button name is: submit
you're checking $_post['submit']
submit
different submit
case closed!
Comments
Post a Comment