title: form textarea instead of input
body: <p>I got this code and I want to modify it a bit. It is a form that shows the number of words in a text. I want to change the input (
  
  <p>I have tried many things to use a textarea but either there is no output or the original text disappears. Changing the name into id didn't work, same for the 'normal way of using a textarea'. </p>
  
  <p>Is there a way of doing of replacing the input with textarea? One thing that has to stay is that after a submit the text in the textarea needs to be visible.</p>
  
  <p>I appreciate any help.</p>
  
  <pre><code>&lt;?php
  error_reporting(0);
  $inputtext = $_POST['ipt'];
  
  
  if ($_POST['clear']) {
      $inputtext   = "";
      $output1 = "";
  }
  
  if ($_POST['send']) {
      $output1 = "Number of words in this text: " . str_word_count($inputtext);
  }
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;style&gt;
  body {
  font-family:arial;
  font-size:12px
  }
  
  .bigtextarea {
  width:100%;
  height:40%;
  min-height:200px
  }
  
  textarea {
  font-family:monospace;
  border-color:#a9a9a9
  }
  &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;title&gt;Form results on one page after submit&lt;/title&gt;
  &lt;body&gt;
  &lt;form action="" method="POST"&gt;
    &lt;h1&gt;Form results on one page after submit&lt;/h1&gt;
    &lt;h3&gt;Copy and Paste text:&lt;/h3&gt;
    &lt;input class="bigtextarea" wrap="hard" type= textarea name=ipt value="&lt;?php echo $inputtext;?&gt;" height="100px" size="100%"&gt;
    &lt;input type="submit" name="send" value="Ok" title="Click here to display values."&gt;
    &lt;input type="submit" name="clear" value="Clear" title="Click here to clear text boxes."&gt;
  &lt;/form&gt;
  &lt;?php
  echo "&lt;br&gt;&lt;br&gt;";
  echo "&lt;font size='4'&gt;";
  echo $output1;
  echo "&lt;/font&gt;";
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>