Need help please

I would be ever grateful to get this to work…

Below is the first 21 of 261 lines.

When I go to website/lxadmin.php?admin=password, to access the admin page, I get an
error message. [You must supply your password]

The lxadmin.php should recognize the password value on lxconfig.php and it isn’t.

Here is the code on lxconfig.php

[php]//Your password for LX
$password = “1234567”;[/php]

Here’s the code on lxadmin.php

[php]<?php
include ‘lxconfig.php’;

if($admin)
{
if ($admin != $password)
{
exit(“Incorrect password”);
}
}

if(!$admin)
{
exit(“You must supply your password”);
}

if($batchcheck)
{

MYSQL_CONNECT($dbserver,$dbuser,$dbpass) OR DIE(“Unable to connect to database”);
@mysql_select_db($dbname) or die(“Unable to select database”);[/php]

To test admin I deleted the below code and was able to log into lxadmin.php?admin (with no password) but then anyone could because I can’t password protect the file in cpanel.

[php]if($admin)
{
if ($admin != $password)
{
exit(“Incorrect password”);
}
}

if(!$admin)
{
exit(“You must supply your password”);[/php]

Thanks in advance,
Roy

Unless you’re doing it other parts of the code, i don’t see where you’re capturing admin from the url
[php]
include ‘lxconfig.php’;
$admin = $_GET[‘admin’]; // captures the password from the url
if($admin) {
if ($admin != $password) {
exit(“Incorrect password”);
}
}
if(!$admin) {
exit(“You must supply your password”);
}

// batch thingy[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service