setAuthData

From: Date: Thu, 23 Jan 2003 15:31:16 +0000
Subject: setAuthData
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3430@lists.php.net to get a copy of this message
Hello, I am newbie with PEAR and my first object of interest is the Auth-package. I want to give an additional data with my auth-session. This is my login-page : <? require_once "Auth/Auth.php"; $dsn = "mysql://readonly:@localhost/user"; $a = new Auth("DB", $dsn); $a->start(); if ($a->getAuth()) { $testvalue=10; $a->setAuthData($testvalue); Header("Location: test.php"); } ?> Login works fine and the script goes via header to the test.php Now I want to extract the testvalue in the test.php: <? require_once "Auth/Auth.php"; $dsn = "mysql://readonly:@localhost/user"; $a = new Auth("DB", $dsn); $a->setShowLogin( false ); $a->start(); if (!($a->getAuth())) { Header("Location: login.php"); exit; } $a->getAuthData($testvalue); print $testvalue; ?> But $testvalue is empty. What is going wrong? Thanks. -- | |V| Gunther Grelczak - Deutsches Museum _| | Programmierung | EDV | Multimedia ( ) | | | t: +49.89.2179-349 | f:+49.89.2179-326

« previous php.pear.general (#3430) next »