title: AJAX with HTML?
body: <p>I have a email system I am building for a company that they want to send emails with it. I have a custom HTML editor for it. What I am wanting to do it post the contents to a external PHP file and have it add to the database. </p>
  
  <pre><code>function schedule_eblast (html) {
      var answer = confirm("Are you sure you want to start sending this E-blast?");
      if (answer) {
          $.ajax({
              type: "POST",
              url: "./../../../processes/eblast_schedule.php",
              data: {'html_text': html},
              success: function(theRetrievedData) {
                  if (theRetrievedData == "done") {
                  alert("Your eblast has been successfully scheduled to send. To check it's status, go to the manage eblasts page.");
              } else {
                  alert(theRetrievedData);
              }
          }
      });
      return false;
  }
  </code></pre>
  
  <p>And here is what I have for the header in the eblast_schedule.php file:</p>
  
  <pre><code>&lt;?php
      include('connect.php');
  
      if ((isset($_POST['html_text'])) &amp;&amp; (strlen(trim($_POST['html_text'])) &gt; 0)) {
          $html_text = stripslashes(strip_tags($_POST['html_text']));
      } else {
          $html_text = "";
      }
      if ((isset($_POST['subject'])) &amp;&amp; (strlen(trim($_POST['subject'])) &gt; 0)) {
          $subject = stripslashes(strip_tags($_POST['subject']));
      } else {
          $subject = "";
      }
      ob_start();
  </code></pre>
  
  <p>And yes, it does get called. But when outputting <code>html_text</code>, it removes all the HTML. And when adding to the database, it doesn't show the HTML either.</p>
  
  <p>Help! Thanks.</p>