PDA

View Full Version : i need a login script.


Joe
Wed 14th Jun '00, 9:53am
OK, i want to add a simple Log in form on the bottom of my index.html page, if i use the html from the forumdisplay login, the user can log in, but the script sends the user back to index.html... i need to have a seprate script, say login.php that will let the user log in, then forward the user to the index.php page...

Heres the log in code taken from index.php, I think its as easy as editing this, but i cant program, and cant afford to spend $50 on a book thats 450 pages long to learn how...

<?

if ($action=="login") {
$noheader=1;
}

if ($action=="signup") {
header("Location: member.php?action=signup");
exit;
}

require("global.php");

if (isset($action)==0 or $action=="") {
$action="showforums";
}

if ($action=="login") {
verifyusername($username,$password);

if ($url!="" and $url!="index.php") {
$username=urlencode($username);

if (strpos($url,"?")>0) {
$url.="&username=$username&password=".substr(md5($password),0,strlen($password));
} else {
$url.="?username=$username&password=".substr(md5($password),0,strlen($password));
}
header("Location: $url");
} else {
eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_login")."\",\"index.php\");");
}

exit;

}

Thanks in advance!

sirspot
Sun 4th Apr '04, 1:55pm
I am not a vBulletin user, but PHP is my thing so I do know that more information is needed to answer your question. I don't understand what you mean by,"if i use the html from the forumdisplay login, the user can log in, but the script sends the user back to index.html". Does this mean you already have the HTML form working on your page but when you try to login you are automatically redirected back to your page and not to the forums? If this is the case, you will probably need to know where $url is set (and to what value) to make the appropriate changes.

-Adam

ratheeshcalicut
Tue 6th Apr '04, 2:12am
hai joe


i am a computer student from india .... i read ur problem ...i am redy to help you... what is ur plan ? which is ur site?

mail me

ratheeshcalicut@rediffmail.com