Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8131567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:07:42+00:00 2026-06-06T09:07:42+00:00

I Have a old database to maintain …. they have stored html tags in

  • 0

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

function movie_page($name,$date){
    global $host, $dbname, $user, $pass;
    $DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
    $STH = $DBH->prepare("SELECT * FROM bh_movies WHERE name = ? and re_date = ?");
    $STH->bindValue(1, "$name", PDO::PARAM_STR);
    $STH->bindValue(2, "$date", PDO::PARAM_STR);
    $STH->execute();
    $STH->setFetchMode(PDO::FETCH_ASSOC);
    return $STH;
    }

and output is

$STH = movie_page($id,$date);
     while (($row = $STH->fetch()) !== false) {
    if ($row['actors'] !=''){
    echo '<tr>
            <td><h1><a href="movie_page.php?id='.$row['name'].'">'.$row['name'].'</a></h1></td>
            <td>'.date('d-M-Y',$row['re_date']).'</td>
            <td><a href="movie_page.php?id='.$row['name'].'">
            <img src="'.$row['small_poster'].'" title="'.$row['name'].'" alt="'.$row['name'].'" height="97" width="182"/>
            </a>
            </td>
            <td><a href="movie_page.php?id='.$row['a'].'">
            <td>'.$row['actors'].'</td>
            <td>'.$row['small_desc'].'</td>
            <td>'.$row['big_desc'].'</td>
          </tr>';

     }

i am getting Html tags in output … instead of format paragraph something like this

<font color="green"><B><u>Characters</u></B></font><br><br> <B>Sonu Dilli (KKC)</B> Emraan Hashmi<BR><BR> Sonu Dilli is a streetsmart 

please help

* INPUT Source *

function insert_data(){
    global $host, $dbname, $user, $pass;
    $DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
    $STH = $DBH->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;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:07:43+00:00Added an answer on June 6, 2026 at 9:07 am

    Your data is being converted into HTML entities at some point. Either find the point where it is being converted (probably using htmlspecialchars()) or decode the data when it comes from the database (using htmlspecialchars_decode()).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to maintain an old project without documentation, and there is a database
I'm translating an old database SyBase to MySQL and I have this DDL Query:
I have an old SQL Server 2000 database that I want to get into
I'm migrating an old Sybase database to MySQL and I have to create foreign
The problem I have is that I have an old database where there typically
MSSQL database. I have issue to create database using old databases data. Old database
This is my problem: I have an old database, with no constraints whatsoever. There
I have to maintain an old database which is not properly normalized. For instance
I have an old (~1995) .Data database directory from S-Plus. Is there anyway that
I'm using linq2sql against an old database system. In this system there are three

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.