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!
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!