title: bootstrap-wysiwyg-master post to php
body: <p>I have a problem with the bootstrap-wysiwyg-master edit</p>
  
  <p>I want to post it to a php file to update a mysql table
  and I don't know how to do.</p>
  
  <p>My code :</p>
  
  <pre><code>  &lt;div class="container"&gt;
  
    &lt;form name="myform" id="myform"&gt;
  
    &lt;div class="hero-unit"&gt;
  
      &lt;div id="alerts"&gt;&lt;/div&gt;
      &lt;div class="btn-toolbar" data-role="editor-toolbar" data-target="#editor"&gt;
        &lt;div class="btn-group"&gt;
          &lt;a class="btn dropdown-toggle" data-toggle="dropdown" title="Font"&gt;&lt;i class="icon-font"&gt;&lt;/i&gt;&lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
            &lt;ul class="dropdown-menu"&gt;
            &lt;/ul&gt;
          &lt;/div&gt;
        &lt;div class="btn-group"&gt;
          &lt;a class="btn dropdown-toggle" data-toggle="dropdown" title="Font Size"&gt;&lt;i class="icon-text-height"&gt;&lt;/i&gt;&amp;nbsp;&lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
            &lt;ul class="dropdown-menu"&gt;
            &lt;li&gt;&lt;a data-edit="fontSize 5"&gt;&lt;font size="5"&gt;Huge&lt;/font&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a data-edit="fontSize 3"&gt;&lt;font size="3"&gt;Normal&lt;/font&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a data-edit="fontSize 1"&gt;&lt;font size="1"&gt;Small&lt;/font&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/div&gt;
        &lt;div class="btn-group"&gt;
          &lt;a class="btn" data-edit="bold" title="Bold (Ctrl/Cmd+B)"&gt;&lt;i class="icon-bold"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="italic" title="Italic (Ctrl/Cmd+I)"&gt;&lt;i class="icon-italic"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="strikethrough" title="Strikethrough"&gt;&lt;i class="icon-strikethrough"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="underline" title="Underline (Ctrl/Cmd+U)"&gt;&lt;i class="icon-underline"&gt;&lt;/i&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="btn-group"&gt;
          &lt;a class="btn" data-edit="insertunorderedlist" title="Bullet list"&gt;&lt;i class="icon-list-ul"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="insertorderedlist" title="Number list"&gt;&lt;i class="icon-list-ol"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="outdent" title="Reduce indent (Shift+Tab)"&gt;&lt;i class="icon-indent-left"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="indent" title="Indent (Tab)"&gt;&lt;i class="icon-indent-right"&gt;&lt;/i&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="btn-group"&gt;
          &lt;a class="btn" data-edit="justifyleft" title="Align Left (Ctrl/Cmd+L)"&gt;&lt;i class="icon-align-left"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="justifycenter" title="Center (Ctrl/Cmd+E)"&gt;&lt;i class="icon-align-center"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)"&gt;&lt;i class="icon-align-right"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="justifyfull" title="Justify (Ctrl/Cmd+J)"&gt;&lt;i class="icon-align-justify"&gt;&lt;/i&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="btn-group"&gt;
            &lt;a class="btn dropdown-toggle" data-toggle="dropdown" title="Hyperlink"&gt;&lt;i class="icon-link"&gt;&lt;/i&gt;&lt;/a&gt;
              &lt;div class="dropdown-menu input-append"&gt;
                  &lt;input class="span2" placeholder="URL" type="text" data-edit="createLink"/&gt;
                  &lt;button class="btn" type="button"&gt;Add&lt;/button&gt;
          &lt;/div&gt;
          &lt;a class="btn" data-edit="unlink" title="Remove Hyperlink"&gt;&lt;i class="icon-cut"&gt;&lt;/i&gt;&lt;/a&gt;
  
        &lt;/div&gt;
  
        &lt;div class="btn-group"&gt;
          &lt;a class="btn" title="Insert picture (or just drag &amp; drop)" id="pictureBtn"&gt;&lt;i class="icon-picture"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;input type="file" data-role="magic-overlay" data-target="#pictureBtn" data-edit="insertImage" /&gt;
        &lt;/div&gt;
        &lt;div class="btn-group"&gt;
          &lt;a class="btn" data-edit="undo" title="Undo (Ctrl/Cmd+Z)"&gt;&lt;i class="icon-undo"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a class="btn" data-edit="redo" title="Redo (Ctrl/Cmd+Y)"&gt;&lt;i class="icon-repeat"&gt;&lt;/i&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;input type="text" data-edit="inserttext" id="voiceBtn" x-webkit-speech=""&gt;
      &lt;/div&gt;
  
      &lt;div id="editor"&gt;
        Go ahead&amp;hellip;
      &lt;/div&gt;
  
  
         &lt;input type="hidden" id="html" /&gt;
  
  
        &lt;label&gt;
          &lt;input type="submit" name="button" id="button" value="Submit" class="btn btn-primary"&gt;
        &lt;/label&gt;
    &lt;/div&gt;&lt;!-- / hero-unit--&gt;
  
        &lt;/form&gt;
  
  
      &lt;/div&gt;&lt;!-- / container--&gt;
  
      &lt;script&gt;
      $('#editor').wysiwyg();
      $(document).ready(function() {
      $('.btn btn-primary').click(function() {
  
      var html = $('#editor').val();
      // Put this in the hidden field
      $("#html").val(html);
      $.ajax({
              url: 'update.php',
              type: 'POST',
              data: {
                  content: content
              }
          });
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>I don't know how to send the content of the div "editor" to the php page
  Thank's fot help</p>
  
  <p>Yves</p>