Php 如何使用html标记修复或显示文本
我在博客中使用了CKEditor。每次我发布这篇文章时,它都会显示带有html标记的文本。我正在使用php语言将数据库连接到我的博客前端Php 如何使用html标记修复或显示文本,php,html,ckeditor,Php,Html,Ckeditor,我在博客中使用了CKEditor。每次我发布这篇文章时,它都会显示带有html标记的文本。我正在使用php语言将数据库连接到我的博客前端 [{<h3><strong>INGREDIENTS</strong></h3> <p><strong><em>Pizza Dough: Makes enough dough for two 10-12 inch pizzas</em></strong>&
[{<h3><strong>INGREDIENTS</strong></h3> <p><strong><em>Pizza Dough:
Makes enough dough for two 10-12 inch pizzas</em></strong></p> <ul>
<li><strong> ]}
[{配料比萨饼面团:
做足够的面团做两个10-12英寸的比萨饼
]}
我该怎么解决这个问题?任何帮助都将不胜感激。多谢各位
这是我的表格代码
<form action="AddNewPost.php" method="post" enctype="multipart/form-data">
<div class="card bg-secondary text-light mb-3">
<div class="card-body bg-dark">
<div class="form-group">
<label for="title"> <span class="FieldInfo"> Post Title: </span></label>
<input class="form-control" type="text" name="PostTitle" id="title" placeholder="Type title here" value="">
</div>
<div class="form-group">
<label for="CategoryTitle"> <span class="FieldInfo"> Chose Categroy </span></label>
<select class="form-control" id="CategoryTitle" name="Category">
<?php
//Fetchinng all the categories from category table
global $ConnectingDB;
$sql = "SELECT id,title FROM category";
$stmt = $ConnectingDB->query($sql);
while ($DataRows = $stmt->fetch()) {
$Id = $DataRows["id"];
$CategoryName = $DataRows["title"];
?>
<option> <?php echo $CategoryName; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<div class="custom-file">
<input class="custom-file-input" type="File" name="Image" id="imageSelect" value="">
<label for="imageSelect" class="custom-file-label">Select Image </label>
</div>
</div>
<div class="form-group">
<label for="Post"> <span class="FieldInfo"> Post: </span></label>
<textarea class="form-control" id="Post" name="PostDescription" rows="8" cols="80"></textarea>
</div>
职位名称:
选择Categroy
选择图像
职位:
这是编辑代码
<script>
CKEDITOR.replace( 'PostDescription' );
</script>
CKEDITOR.replace('PostDescription');