Re: using Auth.php

From: Date: Mon, 18 Feb 2002 09:13:32 +0000
Subject: Re: using Auth.php
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-864@lists.php.net to get a copy of this message
On Sun, 17 Feb 2002 23:06:23 -0600, David Dahl wrote: >Here is what I have managed to screw up so far (all i get is a parse >error): Where do you get that parse error? >=====Security.php===== ><?php >require_once "Auth/Auth.php"; >require_once "classes/ui.class.php"; > >class security extends Auth { > >var $username; >var $password; >var $status; >var $params = array( > "dsn" => "mysql://root:****@127.0.0.1/wos", > "table" => "employees", > "usernamecol" => "username", > "passwordcol" => "password" > ); > >function login_screen($username, $password, $status) >{ >//calls "UI" forms and html widgets > $ui = new ui; > $ui->login($username); >} > > >} > >?> You don't need to subclass Auth: Simply create a function login_screen() in the global scope and pass it via the third parameter to Auth. The array $params can be passed as the second paramter: $a = new Auth("DB", $params, "login_screen"); - Martin

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