Re: Login Form
| From: | Klaus Guenther | Date: | Mon, 18 Oct 2004 21:09:24 +0000 |
| Subject: | Re: Login Form | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33955@lists.php.net to get a copy of this message | ||
Your problem is in check_login.php. Trace it back as far as you can and you'll probably come across it anyway. Checking the error_log will be helpful, as well.
Klaus
Ronan Lehane wrote:
Hi All, I have had a look around there and realise ye may be sick of haering this question but I really can't find the answer. I have a login script that will leave me log in but if I try to logout it says Fatal error: Call to a member function on a non-object in C:\xampplite\htdocs\project\db\check_login.php on line 21 logout.php <?php require 'db_connect.php'; if ($logged_in == 0) { die('You are not logged in so you cannot log out'); } unset($_SESSION['username']); unset($_SESSION['password']); //kill the session variables $_SESSION = array(); //reset the session array. session_destroy(); //destroy the session header('Location:index.php'); //redirect to index page ?> and check_user.php login 21 is $pass = $db->query("SELECT password FROM users WHERE username = '".$_SESSION['username']."'"); Any help would be greatly appreciated Regards, Ronan