RE: [PEAR] Auth problem

From: Date: Wed, 21 Apr 2004 11:58:59 +0000
Subject: RE: [PEAR] Auth problem
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11989@lists.php.net to get a copy of this message
Hi, did you try to rename your 'loginFunction()' into something other, like 'loginForm()' then you must also change the statement where you instanciate the Auth class : $a = new Auth("DB", $dsn, "loginForm"); Vincent -----Original Message----- From: lists [mailto:lists@pardel.net] Sent: mercredi 21 avril 2004 11:22 To: pear-general@lists.php.net Subject: [PEAR] Auth problem 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 -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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