PHP - 不推荐使用mysql_prep [重复]

This question already has an answer here:

I'm working on a login form and am using some code from a tutorial. Now I don't remember what the mysql_prep was for and whether it's deprecated, since it's not mysqli... I couldn't really make sense of what I googled.

Is it ok to use this or should I use something else or not use it all together?

It looks like this (variables used to update SQL table):

$username = mysql_prep($_POST["username"]);
$password = mysql_prep($_POST["password"]);
$hashed_password = password_hash($_POST["password"], PASSWORD_DEFAULT);

</div>

mysql_prep must be some user defined function. It does not exist in the php docs.

http://php.net/manual-lookup.php?pattern=mysql_prep&scope=quickref

Look inside this function in your own code and if it has any references to mysql_ functions then consider it deprecated. All mysql_ functions are deprecated as of PHP 5.5 and are removed in PHP 7.

Use mysqli_ functions or PDO instead.