PDA

View Full Version : login and registration



lydia219
February 11th, 2003, 11:13 AM
I don't have any knowledge of ASP or PHP. I created a flash page with user name and password access function. I need to know what I need to do for textfield and what I need to require other people do in ASP. Then I can load variable data from the form which did in ASP.

I'm so worry about it. Hope to hear from you soon.

Thanks

Lydia

Kel - 420
February 11th, 2003, 10:22 PM
I was just playing around with this myself.

This is the code you need but I’m still trying to work out how to make it re-direct you to a specific URL once you get passed the username/password and how to have more than one name and password.

Put this b4 all PHP:


<?php

if(!isset($PHP_AUTH_USER))
{
Header("WWW-Authenticate: Basic realm=\"Admin Page\"");
Header("HTTP/1.0 401 Unauthorized");
echo "A username and password with administrative privileges are required for access to these pages.\n";
exit;
}
else
{

if($PHP_AUTH_USER!='kel' || $PHP_AUTH_PW!='420')
{

Header("WWW-Authenticate: Basic realm=\"Admin Page\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Invalid username or password.\n";
exit;
}

}

?>

lydia219
February 12th, 2003, 08:56 AM
Thanks a lot and waiting to your further helps

Lydia

Kel - 420
February 12th, 2003, 03:20 PM
Like I said, I’m still trying to work out how to make it re-direct you to a specific URL once you get passed the username/password and how to have more than one name and password.

So if anyone can help with those questions then we’ll be stylin.