|
I assume that session is created in the init.php since its not done in either of these two scripts.
Doesn't answer the question of where $reg is created. It's not in register.php, but you are assigning it to $_SESSION['user_id']. Since it's null, the isset check won't pass either.
I made the assumption that you actually attempted to call your login_check function manually to verify it is returning false. This looks a lot more to me that loggedin is returning false.
Fix the problem with the $_SESSION['user_id'] = $reg; by assigning $reg to something, and then see what it does.
You have other errors here too, like the confirmation password check will never enter that if branch. But that isn't relevant to the current issue.
|