php - SQL injection protection ERROR -


am using following code protect sql injection work

  • am using in net beans getting error in $_post error do not access supergloab $_post directly how solve warning message

    $place = mysql_real_escape_string($_post['place']); $product = mysql_real_escape_string($_post['product']); $type = mysql_real_escape_string($_post['type']); $title = mysql_real_escape_string($_post['title']); $detail = mysql_real_escape_string($_post['detail']); $mobilebrand = mysql_real_escape_string($_post['mobilebrand']); $mobilemodel = mysql_real_escape_string($_post['mobilemodel']); $mobilecond = mysql_real_escape_string($_post['mobilecond']); $price = mysql_real_escape_string($_post['price']); $location = mysql_real_escape_string($_post['location']); $description = mysql_real_escape_string($_post['description']); $youare = mysql_real_escape_string($_post['youare']); $name = mysql_real_escape_string($_post['name']); $email = mysql_real_escape_string($_post['email']); $phonenumber = mysql_real_escape_string($_post['phonenumber']); 

do this:

$place = filter_input(input_post, $_post["place"]); ... 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -