How to create test table for auth

From: Date: Thu, 13 Mar 2003 02:25:03 +0000
Subject: How to create test table for auth
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4194@lists.php.net to get a copy of this message
Just started using Auth 1.2.0. I tried to put together a sample page. I used the example from Auth.php lines 73-105. When I run it I see the default Auth login screen. I created a table called users and set username as 'user1', with no password. When I try to log in, it says 'Wrong Login data' + the rest of the login screen. Here's my code if this helps: require_once "Auth/Auth.php"; $dsn = "mysql://username:password@localhost/database"; $options = array( 'table' => 'users', 'dsn' => $dsn ); $a = new Auth("DB",$options); $a->start(); if ($a->getAuth()) { echo "Welcome user ".$a->getUsername()."!<br />\n"; } Any help? Peter Meth

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