note 83714 rejected from ref.session by mgf

From: Date: Mon, 09 Jun 2008 11:12:43 +0000
Subject: note 83714 rejected from ref.session by mgf
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140266@lists.php.net to get a copy of this message
Note Submitter: dchouser at gmail dot com ---- question: Lets say I have a MYSQL table called "users". I've created a registration page that inputs their name, password, email, etcl. I want to have a login form on my index. If somebody is already logged in, I don't want the form to show, I want it to say "Logged in as - "userName"". I figured I could use sessions. Like: session_start(); if (!isset($_SESSION['SESS_MEMBER_ID'])) { show "logged in as" } else { show form} Is this right? I cant seem to get it to work.

« previous php.notes (#140266) next »