Problem with Auth
| From: | Leonie \(phpgroup\) | Date: | Sun, 20 Mar 2005 03:24:25 +0000 |
| Subject: | Problem with Auth | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18156@lists.php.net to get a copy of this message | ||
I have created a very simple auth routine that almost copies the example given in the Pear Auth documentation. But despite using the default table structure and making sure I'm entering the correct username/password I still can't access the document.
Here is the file I load at the beginning of each document.
<?
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\"><br />";
echo "<input type=\"password\" name=\"password\"><br />";
echo "<input type=\"submit\">";
echo "</form>";
}
$a = new Auth("DB", $dsn, "loginFunction");
$a->start();
if (!isset($_GET['login'])) {
exit();
}
?>
The $dsn string is created in the data connection file which is loaded beforehand and is correct.
Any suggestions what I'm doing wrong?
Leonie