Re: [PHP] Pear Auth problem

2012-03-21 Thread Govinda
> Hello.
> I am trying to use pear Auth packet but am doing something wrong.
> I am currently looking at the simple example in the documentation, but
> something is wrong in my source code, because if I write a username
> and a password in the fields and hit the submit button, I receive a
> blank pages without any informatio at all..
> 
> Here is my source code:
> ---
> 
>  
> require_once('Auth.php');
> if(!isset($_POST['submit'])){
> function loginFunction($username = null, $status = null, &$auth = null){
> ?>
> 
> 
> 
>Login:
>   
>Username:
>   
>
>
>Password:
>   
>
>
>
>
>
> 
> 
>}
> 
>   $options = array(
>   'dsn' => "mysql://username:password@localhost/database",
>   );
>   $a = new Auth("DB", $options, "loginFunction");
>   $a->start();
>   
>   if($a->checkAuth()){
>   header("Location: http://www.karl-arne.name/";);
>   }
> } 
> ?>
> 
> The example is located at:
> http://pear.php.net/manual/en/package.authentication.auth.intro.php

Karl,

You'll want to turn on error reporting so you can start to get a peak into what 
is happening..  Do you know how to do that?  (... so that you get more info. 
than just a blank page).

-Govinda


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Pear Auth problem

2012-03-21 Thread Karl-Arne Gjersøyen
Hello.
I am trying to use pear Auth packet but am doing something wrong.
I am currently looking at the simple example in the documentation, but
something is wrong in my source code, because if I write a username
and a password in the fields and hit the submit button, I receive a
blank pages without any informatio at all..

Here is my source code:
---




  
Login:

Username:



Password:








 "mysql://username:password@localhost/database",
);
$a = new Auth("DB", $options, "loginFunction");
$a->start();

if($a->checkAuth()){
header("Location: http://www.karl-arne.name/";);
}
}   
?>

The example is located at:
http://pear.php.net/manual/en/package.authentication.auth.intro.php

Thanks for your time.
Karl

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php