Thanks for your reply.
I updated the codes.
- I already figured out that I had to use == instead of =.
- I changed 'SELECT * FROM users' to 'SELECT rank FROM users', that does norrow the info selected a bit. I tried to make a $SESSION['rank'], but I didn't get that working. Any tips?
- About including check_login.php, that doesn't matter anymore. I have managed to merge check_login.php into login.php. I figured that should be safer.
- And I'm wondering if I should change 'addslashes' to 'mysql_real_escape_string' in login.php here
if($_POST['login'])
{
$username = addslashes($_POST['username']);
I know that 'mysql_real_escape_string' prevents sql injection, but I see people using 'addslashes' infront of the username $_POST in tutorials when loging in. I don't really get what 'addslashes' does.
I still have no clue on how I can make my member-system safer and how people can take advantage of a unsafe system.