Jump to content

decon

New Members
  • Posts

    1
  • Joined

  • Last visited

decon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So, I'm kinda new to PHP I started learning it a couple months ago and I'm currently trying to make a login/register system with a user control panel, admin backend etc... I've got the registration part down I can insert users into the database, etc but I'm still sorta a noob to this. So basically I'm trying to check if the user is logged in using $_SESSION like everyone does, well mostly I think. Anyway here is the code I'm using for my file login_check.php: <?php session_start(); if ( isset( $_SESSION[ 'logged_in' ] && $_SESSION[ 'logged_in' ] == true ) ){ echo "You are logged in<br/>"; }else { echo "You are not logged in<br/>"; } ?> once I go to login_check.php on my website the page is completely blank, and as far as I'm aware a blank page in PHP means there is a error in the code. but I've tried to fix the errors, I've narrowed it down to being the 3rd line. Something is wrong with it, but I'm not sure what. Please help. Thanks guys.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.