Jump to content

matt2385

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Everything posted by matt2385

  1. I am using the newest version of PEAR Auth. The login I created worked, it logs in and displays the user id from the table from the object. When I try to navigate to the link on page1, I get a MDB2 Error: not found. I am currently running everything off a shared host which runs pear from a directory. Here is my login page. <?php include 'Auth/Auth.php'; function loginFunction($username = null, $status = null, &$auth = null) { /* * Change the HTML output so that it fits to your * application. */ echo "<form method=\"post\" action=\"page1.php\">"; echo "<input type=\"text\" name=\"username\">"; echo "<input type=\"password\" name=\"password\">"; echo "<input type=\"submit\">"; echo "</form>"; } $a = &new Auth('MDB2', $loginOptions,'loginFunction'); $a->start(); if (!$a->checkAuth()) { echo 'not authorized - exiting' . '<br />'; exit(); } ?> Page1.php <?php require_once dirname(__FILE__).'/login.php'; echo $a->getUserId(); ?> <html> <head> </head> <body> <a href="<?php echo $url;?>/page1.php">Home</a> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.