PHP mysql injection protection

前端 未结 6 1548
野性不改
野性不改 2020-12-10 17:53

I have written this short function to protect against my_sql injection, because of its importance I just want to double check with other\'s that this will function as I inte

6条回答
  •  庸人自扰
    2020-12-10 18:13

    you need to explicitly add the database connection identifier into

    mysql_real_escape_string(..., $db_connection_identifier);
    

    mysql_real_escape_string

    string mysql_real_escape_string ( string $unescaped_string [, resource $link_identifier ] )

提交回复
热议问题