title: wysiwyg bootstrap save to database
body: <p>I am unable to save content written inside the editor to my database. </p>
  
  <p>I have noticed that if i change the div to textarea, it saves just fine to the database. But that 'solution' removes the functionality of the wysiwyg and is unable to save in rich data format, which I need. </p>
  
  <p>So how do I save to my database with divs?</p>
  
  <p>Heres my code:</p>
  
  <pre><code>&lt;form method="post" action="index.php"&gt;
        &lt;div id="editor" name="test"&gt;
          &lt;?
  
    $sql = "SELECT blaabog FROM brugere WHERE id='1'";
    $result = $conn-&gt;query($sql);
  
        while($row = $result-&gt;fetch_assoc()) {
            echo $row["blaabog"];
        }
  
    ?&gt;
  &lt;/div&gt;
        &lt;button class="btn btn-default" type="submit"&gt;Send Post&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>If I change my code to this, it saves to the database, but as described above ruins other functionality.. </p>
  
  <pre><code>&lt;form method="post" action="index.php"&gt;
        &lt;textarea id="editor" name="test"&gt;
          &lt;?
  
    $sql = "SELECT blaabog FROM brugere WHERE id='1'";
    $result = $conn-&gt;query($sql);
  
        while($row = $result-&gt;fetch_assoc()) {
            echo $row["blaabog"];
        }
  
    ?&gt;
  &lt;/textarea&gt;
        &lt;button class="btn btn-default" type="submit"&gt;Send Post&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>How do I fix this so I am able to save to my database in rich data format?</p>
  
  <p>Thanks</p>