title: Cant insert all html form code from DATABASE into textarea
body: <p>I have large html code inside my DATABASE. I need to get that into textarea for editing purpose. I can do that all but i have problem when it is displaying code into textarea. Half code is inside of textarea but other half display form not code and it display it out of textarea. (<a href="https://i.stack.imgur.com/J5Ry2.jpg" rel="nofollow noreferrer">See Picture</a> ).</p>
  
  <p>Passing data from DATABASE:</p>
  
  <pre><code>&lt;?php 
  include_once("scripts/connect.php");
  $id = $_GET['id'];
  $result = mysqli_query($mysqli, "SELECT * FROM formsAndCategories WHERE id=$id");
  while($res = mysqli_fetch_array($result))
  {
      $category = $res['category'];
      $form = $res['form'];
  }?&gt;
  </code></pre>
  
  <p>Displaying code from DATABASE (issue is with textarea. its displaying wrong on page):</p>
  
  <pre><code> &lt;form name="form1" method="post" action="edit.php"&gt;
              &lt;label class="fb-textarea-label"&gt;Form Code&lt;/label&gt;&lt;textarea name="form" class="form-control" rows="25"&gt;&lt;?php echo $form;?&gt;&lt;/textarea&gt;
              &lt;label class="fb-text-label"&gt;Category&lt;/label&gt; &lt;td&gt;&lt;input type="text" name="category" class="form-control" value="&lt;?php echo $category;?&gt;"&gt;&lt;/td&gt;
              &lt;input type="hidden" name="id" value="&lt;?php echo $_GET['id'];?&gt;"&gt;&lt;/td&gt;
              &lt;input type="submit" class="btn btn-success" name="update" value="Update"&gt;&lt;/td&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>So far i tryed to do that on plain page. I was thinking maby those all (bootstraps, jquery and css etc) are ruining it all. But nothing.
  Then i found out that there is no character limit in textarea but anyway i tryed to set character limit with <code>maxlength="200000"</code>.
  Then i tryed different code because i was thinking maby there is problem with html form code but nothing.</p>
  
  <p>If it is not possible in this way then maby there is different way to do this ?
  If somebody can help me out with this it would be great.
  Thank You.</p>