- Impact
- 19
Hey
This is soooo messed up
i had another thread about this...and i figured out some of the isues but still not the admin one
okay so this is the code that I THINK does the admin password and user name thing
So i removed the function...tht asks for the username and password and the admin panal worked...and then i changed the user name and password and copied the code back on...and again..i cant login...i am entering the user name and pass correctly but it just wont work
anyone wana help .... plz plz plz
if anyone can add me on msn it will be great
[email protected]
hey guyz
anyone?
well i tried to make it html form kinda login thing and it dint work
anything wrong wid thsi code? it gives some T error
This is soooo messed up
i had another thread about this...and i figured out some of the isues but still not the admin one
okay so this is the code that I THINK does the admin password and user name thing
PHP:
function authenticate() {
global $err;
header( "WWW-Authenticate: Basic realm=\"Test Authentication System\"");
header( "HTTP/1.0 401 Unauthorized");
die($err[1]);
}
// subject for welcome email
$subject="Hello";
// do not edit below
if(!MYSQL_CONNECT($hostnm,$usernm,$pwd)){
die($err[2]);
}
if (!mysql_select_db("$dbName")){
die($err[2]);
}
$query = "select * from tle_pass where login=\"".$PHP_AUTH_USER."\" and pass=\"".(crypt($PHP_AUTH_PW,2))."\"";
$result = MYSQL_QUERY($query);
if((mysql_num_rows($result)!=1)or($PHP_AUTH_USER=="")or($PHP_AUTH_PW=="")){
authenticate();
}
anyone wana help .... plz plz plz
if anyone can add me on msn it will be great
[email protected]
hey guyz
anyone?
well i tried to make it html form kinda login thing and it dint work
anything wrong wid thsi code? it gives some T error
PHP:
<?PHP
function authenticate() {
global $err;
echo "<form method='post' action='<?php echo $PHP_SELF;?>'>
Username:<input type='text' size='12' maxlength='12' name='Username'>:<br />
Password:<input type='text' size='12' maxlength='36' name='Password'>:<br />
</form>";
die($err[1]);
}
// your MySQL details
$hostnm = "localhost";
$usernm = "linkpro_db";
$pwd = "db";
$dbName = "linkpro_db";
$username = $_POST['Username'];
$pasword= $_POST['Password'];
// subject for welcome email
$subject="Welcome to LinkProcess";
// do not edit below
if(!MYSQL_CONNECT($hostnm,$usernm,$pwd)){
die($err[2]);
}
if (!mysql_select_db("$dbName")){
die($err[2]);
}
$query = "select * from tle_pass where login="$username" and pass=\"".(crypt($password,2))."\"";
$result = MYSQL_QUERY($query);
if((mysql_num_rows($result)!=1)or($username=="")or($password=="")){
authenticate();
}





