I am getting an error:
" mysql_real_escape_string() expects parameter 2 to be resource"
My connection is defined in an include file as:
$conn = new mysqli($servername, $username, $password, $dbname);
The connection goes is made fine.
The mysql_real_escape_string code that's getting the error is like
$first_name = mysql_real_escape_string(trim(strip_tags($_POST['first_name'])), $conn);
I am trying to go about making this form in the way I think I have been reading that will make the site and database less susceptible to various attacks; to be honest, I think i am coming to the conclusion that this function is depreciated, and I guess I should probably be looking to just use other tools. But, I am still baffled by this error.
Also, I guess any advise about how to learn about making this form more secure would be greatly appreciated.
Thank you very much for your help!!