Note that there are some explanatory texts on larger screens.

plurals
  1. POBasic contact form php not working, getting empty messages from my form
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/12859615/my-contact-form-sends-blank-body-messages">My contact form sends blank body_messages</a> </p> </blockquote> <p>My contact form is sending emails but they are all empty. All I get is this;</p> <pre><code>From: Email: Company: </code></pre> <p>I really need this working.</p> <p>Here is my form:</p> <pre><code>&lt;form class="contact_form" action="kontakt.php" method="post"&gt; &lt;p&gt;&lt;input type="text" required="required" id="name" name="name" class="text_input" size="22" /&gt; &lt;label for="name"&gt;Namn *&lt;/label&gt;&lt;/p&gt; &lt;p&gt;&lt;input type="text" required="required" id="company" name="company" class="text_input" size="22" /&gt; &lt;label for="company"&gt;Företag *&lt;/label&gt;&lt;/p&gt; &lt;p&gt;&lt;input type="email" required="required" id="email" name="email" class="text_input" size="22" /&gt; &lt;label for="email"&gt;Epost *&lt;/label&gt;&lt;/p&gt; &lt;p&gt;&lt;textarea required="required" name="content" class="textarea" cols="30" rows="5"&gt;&lt;/textarea&gt;&lt;/p&gt; &lt;p&gt;&lt;button type="submit" class="button white"&gt;&lt;span&gt;Skicka&lt;/span&gt;&lt;/button&gt;&lt;/p&gt; &lt;input type="hidden" value="info@web.se" name="contact_to"/&gt; &lt;/form&gt; </code></pre> <p>and this is my php:</p> <pre><code>&lt;?php $name = $_POST['name']; $company = $_POST['company']; $email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL); $content = $_POST['content']; $mail_to = 'info@web.se'; $subject = 'Lilla form'.$name; $body_message = 'From: '.$name."\n"; $body_message .= 'E-mail: '.$email."\n"; $body_message .= 'Message: '.$content; $headers = 'From: '.$email."\r\n"; $headers .= 'Reply-To: '.$email."\r\n"; $mail_status = mail($mail_to, $subject, $body_message, $headers); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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