0
我想回调content_columns的价值jquery。我想回拨一个字符串在PHP JQUERY
PHP代码:
if($act=="getcol"){
$pid=$_GET['pid'];
$domain_id = 1;
$PAGEresult = mysql_query("SELECT * FROM pages WHERE domain_id='$domain_id' AND id='$pid' ORDER BY id DESC");
$PAGErow = mysql_fetch_array($PAGEresult);
echo json_encode($PAGErow['content_columns']);
}
jQuery的
$.get("get_actions.php?act=getcol&pid="+pid, function(data){
alert(data);
});
有人能指引我正确的道路吧。
什么似乎是问题? – Reigel 2010-10-08 09:37:09
SQL注入!如果没有某种参数化(防止SQL注入攻击),请小心不要直接在查询中使用参数。 – 2010-10-08 09:38:20
它不断出现相同的字符串 – Rickstar 2010-10-08 09:44:31