[advanced search]
Results from the most recent live auction are here.
21 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Domain Name Industry Newsletter
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 04-12-2006, 04:38 PM   · #1
unknowngiver
Senior Member
 
Name: Zubair
Location: Ontario Canada
Trader Rating: (53)
Join Date: May 2005
Posts: 2,754
NP$: 724.15 (Donate)
unknowngiver is a name known to allunknowngiver is a name known to allunknowngiver is a name known to allunknowngiver is a name known to allunknowngiver is a name known to allunknowngiver is a name known to all
what is this code..need help please

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

PHP Code:
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();
}

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
admin@apkafuture.com

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 Code:
<?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();
}


Please register or log-in into NamePros to hide ads
unknowngiver is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Hunting Moon Website Header Design RealTechNetwork
Advertise your business at NamePros
All times are GMT -7. The time now is 10:11 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0