When a person registers on my site, or logs in, they are sent to "thanks.php".
The page checks is you're logged in or not and if so, tells you what you can do and if not, gives you a link to the register.php page.
However, anyone can make their own cookie and trick the script like that.
How do I protect myself from this?
One thing I thought of was checking if the $_SESSION['session_id']
is present in the database. Far as I know, you can't generate that yourself and even if you could, you'd need database access to find one out.
I'm not too sure however, does anybody have some advice or experience about this sort of "thanks" pages?