Announcement

Collapse
No announcement yet.

i need a login script.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • i need a login script.

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

    Code:
    <?
    
    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!
    Bike Forums.net

  • #2
    Not enough information

    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

    Comment


    • #3
      i am redy to do php login

      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

      [email protected]

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X