Do I have to use mysql_real_escape_string
for every query or just when there are user inputs on the page?
Let's say I have:
$check = mysql_query ("SELECT * FROM users WHERE user='$user' AND pm='$on'");
$numrows_check = mysql_num_rows($check);
if ($numrows_check == 1) {
Do I have to worry about SQL injections here if the page has no user inputs?
P.S.
I know pdo
and mysqli
, I'm asking specifically for mysql
. Thanks.