【问题标题】:How to send an embedded code into server side -PHP如何将嵌入式代码发送到服务器端-PHP
【发布时间】:2017-05-07 17:55:34
【问题描述】:

我的一个 HTML 表单接受嵌入式代码作为输入,并使用 PHP 保存在 MySQL 数据库中。我用过

jQuery('#userFrm').serialize();

将数据发送到后端并在服务器端接受为

$_POST['video_url']

但显示错误如下

The requested URL /'//www.hudl.com/embed/video/3/4897424/5721e0c70428ae20e4de8b97/' was not found on this server.

输入时

<iframe src='//www.hudl.com/embed/video/3/4897424/5721e0c70428ae20e4de8b97' width='640' height='360' frameborder='0' allowfullscreen></iframe>

在文本区域中。

我们是否需要在表单中包含一个额外的参数以作为嵌入式代码发送到后端?

【问题讨论】:

    标签: php html ajax forms post


    【解决方案1】:

    您好,当您将数据插入数据库时​​,请使用 mysql_escape_string 。当您打印或获取结果时使用stripslashes($row['video']);

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-12
      • 1970-01-01
      • 1970-01-01
      • 2017-09-07
      • 1970-01-01
      相关资源
      最近更新 更多