Answer the question
In order to leave comments, you need to log in
Problem with output from DB(php,pdo)?
Hi guys!
Actually I have a database with a table content whose type is text.
In this content table there is data like a php code (<?php echo "123"; ?>)
if you remove the tags or insert something like plain text - "lalalala", then everything is displayed, otherwise - a white screen.
PHP file that outputs entry:
...
$sth = $dbh->prepare("SELECT content FROM `pages`");
$sth->execute();
$array = $sth->fetchAll();
foreach ($array as $result_row) {
echo $result_row["content"];
}
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question