title: How to Save HTML to mysql using PHP?
body: <p>I am trying to post some html though a form to a php page and then trying to save that html into database 
  the problem which I am facing is that when I save this to database it includes many html entities with it </p>
  
  <p>for example my original html code is </p>
  
  <pre><code>&lt;div class="flexslider"&gt;
   &lt;ul class="slides"&gt;
  &lt;li class="slide slide--text" data-text="Great Plans And Pricing To Help You Get Started With Your E-Commerce Business"&gt;
    &lt;div class="overdiv" style="position: absolute;"&gt;
             &lt;form method="post" action="https://www.marclick.com/customer/account/create/"&gt;
                &lt;div&gt;
                   &lt;input required type="email" name="email" value="" style="border-radius:10px;" class="form-control" placeholder="Your Email"&gt;
                   &lt;div class="text-left"&gt;&lt;/div&gt;
                   &lt;input type="submit" value="Get Your Online Shop Now!" class="btn btn-warning btn--decorated"&gt;
                &lt;/div&gt;
             &lt;/form&gt;
             &lt;p class="text-left"&gt;No Credit Card Required&lt;/p&gt;
   &lt;/div&gt;
    &lt;img src="img/home_slider/1.jpg" alt=""&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>But When I save it db it becomes</p>
  
  <pre><code>    &lt;p&gt;&amp;lt;!-- Flex full width slider --&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;flexslider&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;nbsp;&amp;nbsp;&lt;br /&gt;
  &amp;nbsp; &amp;lt;ul class=&amp;quot;slides&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;li class=&amp;quot;slide slide--text&amp;quot; data-text=&amp;quot;Great Plans And Pricing To Help You Get Started With Your E-Commerce Business&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&amp;quot;overdiv&amp;quot; style=&amp;quot;position: absolute;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;Get a &amp;lt;span style=&amp;quot;color:#E92803;-webkit-text-stroke-width: 1px;-webkit-text-stroke-color: black&amp;quot;&amp;gt;FREE&amp;lt;/span&amp;gt; Gorgeous Shop in Minutes and Sell Anywhere.&amp;lt;/h2&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;https://www.marclick.com/customer/account/create/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input required type=&amp;quot;email&amp;quot; name=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; style=&amp;quot;border-radius:10px;&amp;quot; class=&amp;quot;form-control&amp;quot; placeholder=&amp;quot;Your Email&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&amp;quot;text-left&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Get Your Online Shop Now!&amp;quot; class=&amp;quot;btn btn-warning btn--decorated&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/form&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p class=&amp;quot;text-left&amp;quot;&amp;gt;No Credit Card Required&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;img src=&amp;quot;img/home_slider/1.jpg&amp;quot; alt=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;nbsp; &amp;nbsp; &amp;lt;/li&amp;gt;&lt;/p&gt;
  </code></pre>
  
  <p>what should I do to save the html as it is and echo it any time it is needed as a html code</p>
  
  <p>here is my PHP code </p>
  
  <pre><code>    $content=$_POST['editor1']; //html
      $seo=addslashes($_POST['keywords']);
      $category=addslashes($_POST['category']);
      $query="INSERT INTO `pages`(`name`,`link`,`seo`,`content`, `category`)
       VALUES 
       ('$title','$permalink','$seo','$content','$category')";
      $result=mysqli_query($link, $query);
  </code></pre>