dpquu9206 2016-10-28 09:11 采纳率: 0%
浏览 186

TinyMCE不会将html标签添加到数据库中

I have an issue with TinyMCE.

I put in

<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script>tinymce.init({selector: 'textarea'});</script>

It loads the textarea fine, but no HTML tags goes into my database. It automatically worked on another site i was working on but it currently doesn't work on this one..

What could be the reason of this?

Code below is directly from what the form is going to load when submitting and further down you'll see my HTML code

    <?php 

include '../dbh.php';

$sDay = filter_input(INPUT_POST, 'sDay', FILTER_SANITIZE_STRING);
$sMonth = filter_input(INPUT_POST, 'sMonth', FILTER_SANITIZE_STRING);
$sYear = filter_input(INPUT_POST, 'sYear', FILTER_SANITIZE_STRING);

$eDay = filter_input(INPUT_POST, 'eDay', FILTER_SANITIZE_STRING);
$eMonth = filter_input(INPUT_POST, 'eMonth', FILTER_SANITIZE_STRING);
$eYear = filter_input(INPUT_POST, 'eYear', FILTER_SANITIZE_STRING);

$eCreated = filter_input(INPUT_POST, 'eCreated', FILTER_SANITIZE_STRING);

$eTitle = filter_input(INPUT_POST, 'eTitle', FILTER_SANITIZE_STRING);
$eAuthor = filter_input(INPUT_POST, 'eAuthor', FILTER_SANITIZE_STRING);
$eDescription = filter_input(INPUT_POST, 'eDescription', FILTER_SANITIZE_STRING);

$sql = "INSERT INTO events (id, eTitle, eAuthor, eStartDate, sDay, sMonth, sYear, eEndDate, eDay, eMonth, eYear, eDescription, eCreated, IsDeleted, eActive)
            VALUES (NULL, '$eTitle', '$eAuthor', '$sYear-$sMonth-$sDay', '$sDay', '$sMonth', '$sYear', '$eYear-$eMonth-$eDay',$eDay, $eMonth, $eYear, '$eDescription', '$eCreated', '0', '0');";
$result = mysqli_query($conn, $sql);

header("Location: ../events.php");

<div class="input-field col col-lg-12">
  <label for="eDescription">Beskrivelse</label>
  <textarea name="eDescription" id="eDescription" type="text"></textarea>
</div>

</div>
  • 写回答

1条回答 默认 最新

  • m0_56517837 2022-05-05 10:56
    关注

    1233123123123

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题