title: Php Function to get html tags from database
body: <p>I Have a old database to maintain .... they have stored html tags in there database and was using old mysql with php to get outupt ... Now  i am trying to use it through function and PDO to get output .... not getting output right .... its just giving html tags display insted of formatting the paragraph ... how can i fix it , here is my code --> Function </p>
  
  <pre><code>function movie_page($name,$date){
      global $host, $dbname, $user, $pass;
      $DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
      $STH = $DBH-&gt;prepare("SELECT * FROM bh_movies WHERE name = ? and re_date = ?");
      $STH-&gt;bindValue(1, "$name", PDO::PARAM_STR);
      $STH-&gt;bindValue(2, "$date", PDO::PARAM_STR);
      $STH-&gt;execute();
      $STH-&gt;setFetchMode(PDO::FETCH_ASSOC);
      return $STH;
      }
  </code></pre>
  
  <p>and output is</p>
  
  <pre><code>$STH = movie_page($id,$date);
       while (($row = $STH-&gt;fetch()) !== false) {
      if ($row['actors'] !=''){
      echo '&lt;tr&gt;
              &lt;td&gt;&lt;h1&gt;&lt;a href="movie_page.php?id='.$row['name'].'"&gt;'.$row['name'].'&lt;/a&gt;&lt;/h1&gt;&lt;/td&gt;
              &lt;td&gt;'.date('d-M-Y',$row['re_date']).'&lt;/td&gt;
              &lt;td&gt;&lt;a href="movie_page.php?id='.$row['name'].'"&gt;
              &lt;img src="'.$row['small_poster'].'" title="'.$row['name'].'" alt="'.$row['name'].'" height="97" width="182"/&gt;
              &lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;&lt;a href="movie_page.php?id='.$row['a'].'"&gt;
              &lt;td&gt;'.$row['actors'].'&lt;/td&gt;
              &lt;td&gt;'.$row['small_desc'].'&lt;/td&gt;
              &lt;td&gt;'.$row['big_desc'].'&lt;/td&gt;
            &lt;/tr&gt;';
  
       }
  </code></pre>
  
  <p>i am getting Html tags in output ... instead of format paragraph something like this</p>
  
  <pre><code>&lt;font color="green"&gt;&lt;B&gt;&lt;u&gt;Characters&lt;/u&gt;&lt;/B&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt; &lt;B&gt;Sonu Dilli (KKC)&lt;/B&gt; Emraan Hashmi&lt;BR&gt;&lt;BR&gt; Sonu Dilli is a streetsmart 
  </code></pre>
  
  <p>please help</p>
  
  <p><em><strong></em>* INPUT Source <em>*</em></strong></p>
  
  <pre><code>function insert_data(){
      global $host, $dbname, $user, $pass;
      $DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
      $STH = $DBH-&gt;prepare("INSERT IGNORE INTO bh_movies 
      (name, bh_link, re_date,  small_poster, big_poster, small_desc, big_desc, actors) 
      value (:name, :bh_link, :re_date, :small_poster, :big_poster, :small_desc, :big_desc, :actors)");
      return $STH;
  }
  </code></pre>