Iterated through my code to turn all my queries into prepared queries (PDOs). I changed the connection page accordingly. When I cleared the page of my functions, I ran into the error mysql_error() expects parameter 1 to be resource, integer given , which referred to my email function
email_exists($email){ $query1 = mysql_query("SELECT COUNT(user_id) FROM tempusers WHERE `email` = '$email'") OR die(mysql_error(0)); $email = sanitize($email); return (mysql_result($query1,0)==1)? true : false; }
Because this is a function page, meaning that I cannot call the variables on my connection page, combined with the fact that I am still stuck in the old query methods that I find it difficult to find. I would appreciate any ideas regarding the process of working with this request, as well as with any advice in general.
source share