I was trying to make a function (within a class) for logging in, this to make it easier on my websites to log in and not have to create al the code over and over again.
Now my problem is here:
$v_user = mysql_query("SELECT * FROM $u_table WHERE $u_row = $username") or die("Error: " .mysql_error());
The error I get is a mysql error, saying I should check my code considering the "'WHERE = '" on line 1.... Is it possible to have variables in my sql like this or do I have to change the constants every time I use the function for another website? How else should I put the variables so that ik might still work.
Thx in advance,