开发者

Error in MySQL/PHP real_escape_string UPDATE function

开发者 https://www.devze.com 2023-02-14 04:51 出处:网络
$query = sprintf(\"UPDATE populationgender SET male=\'%s\', female = \'%s\' WHERE popgenderid=\'4\'\",
   $query = sprintf("UPDATE populationgender SET male='%s', female = '%s' WHERE popgenderid='4'",
             mysql_real_escape_string($male),
             mysql_real_escape_string($female));

Is this a 开发者_Python百科valid sprintf code? because when i use this it does nothing hehe it is connected via googlemaps btw :) pls help thanks :)


You have used escape in javascript as well as php. Try using escape in javascript and unescape in php.

$myvar = urldecode($_GET["male"]);

this will work

0

精彩评论

暂无评论...
验证码 换一张
取 消