Hey, Gurung,
I had the same problem
here.
I don't know what method you are using, but this is how I resolved the problem: I used sessions.
You might want to put the username in $_SESSION['username'] and the password in $_SESSION['password']. This is what I ended up doing. The great thing about sessions is the $_SESSION variable is editable, so to log out, just use unset($_SESSION['username']); and the same with the password.
Remember that pages that use sessions must have session_start(); at the beginning of the page.
HTH,
----------
---Snib---
----------