I have google and searched for sanitization the user posted data and found lot of examples and functions but i haven't find yet any solution which help me to resolve my confusion.
My question is that what is basically done in the following php mysqli built-in function:
// Sanitize. example:
$x = mysqli_real_escape_string($con, $posted_val));
is there any built-in function in PDO or in core php to sanitize the user posted data with?
I have tried to use my own function to sanitize the input by replacing the possible exploitable code and then return the result but I hope there may be some built-in function exits in PDO too? or I may be wrong...