Wrong password message without entering

Ok, so I know very very limited PHP and I recently downloaded a super simple events script that uses a mySQL db to make a table of coming events and such. I logged in once fine, but now I am getting a “wrong password” message by just accessing the page and this happens without cookies or anything. The authentication part is this:

if (isset($_POST[‘pw’]))
$pw = $_POST[‘pw’];
$_SESSION[‘pw’] = $pw;
elseif (isset($_GET[‘pw’]))
$pw = $_GET[‘pw’];
$_SESSION[‘pw’] = $pw;
elseif (isset($_SESSION[‘pw’]))
$pw = $_SESSION[‘pw’];

if ($pw == $adminpass)
include ‘library/opendb.php’;
include ‘library/timeFunctions.php’;
include ‘library/displayFunctions.php’;

// get variables from form post for which record to change, and what to do with it
$action = $_GET[‘action’];
$id = $_GET[‘id’];

Any help? Do you need the rest of the admin file?[/quote]

i would like to see the part where the “wrong password”-message is created.

try using echo($adminpass) to make sure it is contayning the right value.

Sponsor our Newsletter | Privacy Policy | Terms of Service