Je zet in een sessie of een cookie een unieke code, die je ook in member_session zet.
Je zet géén wachtwoorden, gebruikersnamen, user-ids of wat dan ook in cookies; alleen die unieke code.
Dan kijk je bij elk bezoek of die cookie bestaat, en zo ja of hij in de tabel member_session voorkomt.
Als dat ook zo is kijk je bij welk user_id hij hoort en check je ook nog of het IP adres van de bezoeker overeenkomt met het IP adres die je ook in member_session hebt opgeslagen.
Daarna weet je dus op welk account iemand is ingelogd.
Dus kort:
$_COOKIE[code] = 1233f;
tabel member_session:
id | user_id | ip | code
1 | 1 | 127.0.0.1 | 1233f
Dan controleren:
[COLOR= #0000BB]<?php
$ingelogd[/COLOR] [COLOR= #007700]=[/COLOR] FALSE[COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$check[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT user_id FROM member_session WHERE ip = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND code = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$check[/COLOR][COLOR= #007700]) ===[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$fetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$check[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]userid[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user_id[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$ingelogd[/COLOR] [COLOR= #007700]=[/COLOR] TRUE[COLOR= #007700];
}
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je bent [/COLOR][COLOR= #007700].([/COLOR][COLOR= #0000BB]$ingelogd[/COLOR] [COLOR= #007700]===[/COLOR] TRUE [COLOR= #007700]?[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000]niet [/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]ingelogd.[/COLOR][COLOR= #007700];[/COLOR]
?>
Zo zou ik t iig doen.

Edit:
Waar is die tabel Member_login überhaupt voor?
Houd trouwens de tabel- en kolomnamen allemaal in kleine letters, geen idee of je dat al doet, maar ik zeg t maar ff.
