为什么mysql_real_escape_string
不能在这段代码中工作?为什么mysql_real_escape_string在这段代码中不起作用?
正常情况下,当加载页面输入将看起来像这样。
http://image.free.in.th/v/2013/ie/160812064246.jpg
但是当你加载www.example.com/test.php?value_1=">
页为什么输入这个样子的。
http://image.free.in.th/v/2013/ia/160812064312.jpg
我该怎么办?
test.php的
<?PHP
include("connect.php");
$ex_search_value = mysql_real_escape_string($_GET['value_1']);
?>
<input placeholder="PLEASE ENTER" value="<?PHP echo $ex_search_value; ?>" style=" margin: 0px; width: 810px;height: 33px;line-height: 17px;line-height: 33px\0;^line-height: 33px;padding: 0px;margin-right: -1px;padding-left: 5px;-webkit-box-shadow: 0 2px 3px rgba(0,0,0,0.1);-moz-box-shadow: 0 2px 3px rgba(0,0,0,0.1); box-shadow: 0 2px 3px rgba(0,0,0,0.1); ">
你真的不应该再使用mysql API了 – 2016-08-12 06:40:38
你必须在'mysql_real_escape_string'中传递连接变量 – Saurabh
[伟大的逃避现实(或:你需要知道如何处理文本中的文本)](http:// kunststube.net/escapism/) – deceze