Note that there are some explanatory texts on larger screens.

plurals
  1. PONo values in $_POST variable after Submit HTML form
    text
    copied!<p>I have a html form, which is sending the data through POST to the php-file, and the php-file should process the data (make a good looking structure) and send it via mail. </p> <p>But the $_POST variable is completely empty....</p> <p>I have this small html form:</p> <pre><code>&lt;form id="form" method="post" action="formmailer.php"&gt; &lt;div id="input1"&gt; &lt;input name="name" type="text" placeholder="Ihr Name"&gt; &lt;br&gt; &lt;input name="email" type="email" placeholder="Ihre E-Mail"&gt; &lt;br&gt; &lt;/div&gt; &lt;div id="input2"&gt; &lt;textarea name="nachricht" rows="10" cols="30"&gt;&lt;/textarea&gt; &lt;br&gt; &lt;input type="submit" value="" name="submit" id="submit"&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>And formmailer.php uses these variables:</p> <pre><code>&lt;?php // if(isset($_POST['nt']) &amp;&amp; isset($_POST['ntb'])) { // $an = "info@website.de"; $name = $_POST['name']; $email = $_POST['email']; $nachricht = $_POST['nachricht']; // Mailheader UTF-8 $mail_header = 'From:' . $email . "n"; $mail_header .= 'Content-type: text/plain; charset=UTF-8' . "rn"; // create layout $message = " Name: $name Email: $email Nachricht: $nachricht "; // send mail mail($an, $message, $mail_header ); } else { echo("&lt;p&gt;Email delivery failed…&lt;/p&gt;"); } ?&gt; </code></pre> <p>If i use this if-statement</p> <pre><code>if (isset($_POST["submit"])) </code></pre> <p>the mail is sending, but completely empty. </p> <p>Am i blind? It should be really easy, shouldn't it?</p>
 

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