Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy isn't my php script working?
    primarykey
    data
    text
    <p>EDIT: Apparently I have to pay to register another domain on their site to have email capabilities. Sorry for the wasted time, and thanks for the code fixes.</p> <p>I don't have any experience with php. I am just starting to figure it out. I am trying to get my form to send the entered information to my email. I set an else tag but that is all that happens. If you see any errors please let me know. I really want this to work. See for yourself: <a href="http://organizationxiii.co.nf/feedback.html" rel="nofollow">Website</a> The codes are:</p> <p><strong>HTML:</strong></p> <pre><code>&lt;form action="post_comment.php" method="post" id="commentform"&gt; &lt;label for="comment_author" class="required"&gt;Your Name&lt;/label&gt; &lt;input name="name" id="name" tabindex="1" required="required"&gt;&lt;br/&gt;&lt;br/&gt; &lt;label for="email" class="required"&gt;Your Email&lt;/label&gt; &lt;input type="email" id="email" name="email" id="email" value="" tabindex="2" required="required"&gt;&lt;br/&gt;&lt;br/&gt; &lt;label for="comment" id="comment" class="required"&gt;Your Message&lt;/label&gt;&lt;br/&gt; &lt;textarea name="comment" rows="10" tabindex="4" required="required"&gt;&lt;/textarea&gt;&lt;br/&gt; &lt;input id="submit" name="submit" type="submit" value="Submit Comment" /&gt; &lt;input id="send" name="send" type="hidden" value="1" /&gt; &lt;/form&gt; </code></pre> <p><strong>PHP:</strong></p> <pre><code> &lt;?php $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['comment']; $from = 'From: '. $email; $to = 'powersjesse@yahoo.com'; $subject = 'WEBSITE'; $body = "From: $name\n E-Mail: $email\n Message:\n $message"; if ($_POST['send'] == "1") { if (mail($to, $subject, $body, $from)) { echo '&lt;p&gt;Your message has been sent!&lt;/p&gt;'; } else { echo '&lt;p&gt;Something went wrong, go back and try again!&lt;/p&gt;'; }} ?&gt; </code></pre> <p>I get <code>Something went wrong, go back and try again!</code> when I'm trying to submit the form. <strong>Updated code.</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload