Auth problem

From: Date: Wed, 21 Apr 2004 09:21:32 +0000
Subject: Auth problem
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11988@lists.php.net to get a copy of this message
Hello , When trying the example for Auth: <?php require_once "Auth/Auth.php"; function loginFunction() { /** * Change the HTML output so that it fits to your * application. */ echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">"; echo "<input type=\"text\" name=\"username\">"; echo "<input type=\"password\" name=\"password\">"; echo "<input type=\"submit\">"; echo "</form>"; } $dsn = "mysql://user:password@localhost/database"; $a = new Auth("DB", $dsn, "loginFunction"); $a->start(); if ($a->getAuth()) { /** * The output of your site goes here. */ } ?> I got the following error: Fatal error: Cannot redeclare loginfunction() (previously declared in D:\MyWork\WebServer\auth.php:10) in D:\MyWork\WebServer\Auth.php on line 4 Can anyone advise on this? Thank you! Paul

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