title: Textarea content 'error handling' error when using multiple lines
body: <p>I've made a form in html/php in which there is a 'textarea' as well.
  I'm currently implementing error handling; when a mistake has been made in the form, keep the content that has been assigned already by the user.</p>
  <p>When a mistake has been made by the user (for example, invalid e-mail address), the message that the user already had typed into the 'textarea', remains there.</p>
  <p>However, this is ONLY when a message has been typed in which NO new lines have been used (so by pressing ENTER in the textarea). So in a multiple-line text area, for some reason it doesn't work.</p>
  <p>Any ideas on how to fix this?</p>
  <p>Part of the code:</p>
  <pre><code>if (isset($_GET['textmessage'])) {
  $textmessage= $_GET['textmessage'];
  echo'&lt;div class=&quot;user-details&quot;&gt;
          &lt;div class=&quot;input-box&quot;&gt;
              &lt;span class=&quot;details&quot;&gt;Extra message&lt;/span&gt;
              &lt;textarea style=&quot;height: 100px; padding-top: 10px&quot; type=&quot;text&quot; name=&quot;textmessage&quot; placeholder=&quot;message&quot;&gt;';
                  echo $textmessage; 
              echo '&lt;/textarea&gt;
          &lt;/div&gt;
      &lt;/div&gt;';}
  </code></pre>
  <p>Part of the action.php:</p>
  <pre><code>$textmessage= nl2br(htmlspecialchars($_POST['tekstbericht']));
          if (!filter_var($mailFrom, FILTER_VALIDATE_EMAIL)) {
              header(&quot;Location: form.php?form=invalidemail&amp;name=$name&amp;textmessage=$textmessage&quot;);
              exit();
          }
  </code></pre>