User authentication with session variables

General discussions related to php

Moderators: macek, egami, gesf

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

session_register

Postby ruturajv » Tue Apr 15, 2003 2:10 am

use

Code: Select all

session_register('variablename')

Now check if the variable is assigned
like

Code: Select all

if (variable == $_SESSION['variablename'])
{
do stuff for true
} else {
do stuff for false
}

I hope this helps

The session_register('variablename') will create $variablename in sessions array

Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron