Login Script

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

    Login Script

    Hi i need Login Script for my desiwap.info site..

    no email confirmation..reg option.user full details.. in index showen total reg members..whos online..

    pls help me..

    any coder make me spaspic fit on my site.. i ready to pay for coading

    #2
    Do you want PHP: Sessions or just plan user and pass in the headers ??

    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      <div class='quotetop'>QUOTE (subzero @ Mar 9 2009, 02:42 PM) <{POST_SNAPBACK}></div>
      Do you want PHP: Sessions or just plan user and pass in the headers ??[/b]
      need it in php bro..no probs along with sql

      Comment


        #4
        Code:
        // these files should be put in a directory named &#39;inc&#39;
        inc/auth.php      // the meat and potatoes of this subject
        inc/connect.php // an excellent connection script
        inc/nav.php     // navigation include for site
        
        // these files should be on the web root
        index.php  // main page of site
        link_1.php // page of site
        link_2.php // page of site
        link_3.php // page of site
        logout.php   // destroy session and re-direct to login
        Here is the SQL Schema for the table I Query:
        Code:
        CREATE TABLE users (
          user_id int(10) unsigned NOT NULL auto_increment,
          username varchar(20) NOT NULL default &#39;&#39;,
          password varchar(20) NOT NULL default &#39;&#39;,
          PRIMARY KEY  (user_id)
        ) TYPE=MyISAM;
        if you copy and paste these files into your favorite text editor, edit the connect.php with your mysql settings, it should work on your server if sessions are supported.

        inc/auth.php

        Code:
        <? 
        
        // start session 
        session_start();  
        
        // convert username and password from _POST or _SESSION 
        if($_POST){ 
          $_SESSION[&#39;username&#39;]=$_POST["username"]; 
          $_SESSION[&#39;password&#39;]=$_POST["password"];   
        } 
        
        // query for a user/pass match 
        $result=mysql_query("select * from users  
          where username=&#39;" . $_SESSION[&#39;username&#39;] . "&#39; and password=&#39;" . $_SESSION[&#39;password&#39;] . "&#39;"); 
        
        // retrieve number of rows resulted 
        $num=mysql_num_rows($result);  
        
        // print login form and exit if failed. 
        if($num < 1){ 
          echo "You are not authenticated.  Please login.
        
         
           
          <form method=POST action=index.php> 
          username: <input type=text name=\"username\"> 
          password: <input type=password name=\"password\"> 
          <input type=submit> 
          </form>"; 
           
          exit; 
        } 
        ?>

        inc/connect.php

        Code:
        <? 
        
        // replace with your db info 
        $hostname="localhost"; 
        $mysql_login="myusername"; 
        $mysql_password="mypass"; 
        $database="test"; 
        
        if (!($db = mysql_connect($hostname, $mysql_login , $mysql_password))){ 
          die("Can&#39;t connect to mysql.");     
        }else{ 
          if (!(mysql_select_db("$database",$db)))  { 
            die("Can&#39;t connect to db."); 
          } 
        } 
        ?>

        logout.php

        Code:
        <?php
        
        // you must start session before destroying it 
        session_start(); 
        session_destroy(); 
        
        echo "You have been successfully logged out. 
        
        
        
         
        You will now be returned to the login page. 
        
        <META HTTP-EQUIV=\"refresh\" content=\"2; URL=index.php\"> "; 
        ?>
        nav.php

        Code:
        [url="index.php>Home</a>"]link_1[/url] |  
        [url="link_2.php>link_2</a>"]link_3[/url] | 
        <a href=logout.php>logout</a>
        index.php

        Code:
        <? 
        
        // connect to database 
        include("inc/connect.php"); 
        
        // include auth and nav 
        include("inc/auth.php"); 
        
        // begin content 
        include("inc/nav.php"); 
        
        echo "This is my home page."; 
        
        // close mysql connection 
        mysql_close(); 
        ?>
        link_1.php
        Code:
        <? 
        
        // connect to database 
        include("inc/connect.php"); 
        
        // include auth and nav 
        include("inc/auth.php"); 
        
        // begin content 
        include("inc/nav.php"); 
        
        echo "This is my Link 1."; 
        
        // close mysql connection 
        mysql_close(); 
        ?>
        link_2.php

        Code:
        <? 
        
        
        // connect to database 
        include("inc/connect.php"); 
        
        // include auth and nav 
        include("inc/auth.php"); 
        
        // begin content 
        include("inc/nav.php"); 
        
        echo "This is my Link 2."; 
        
        // close mysql connection 
        mysql_close(); 
        ?>
        link_3.php

        Code:
        <? 
        
        
        // connect to database 
        include("inc/connect.php"); 
        
        // include auth and nav 
        include("inc/auth.php"); 
        
        // begin content 
        include("inc/nav.php"); 
        
        echo "This is my Link 3."; 
        
        // close mysql connection 
        mysql_close(); 
        ?>
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          Thank u very much u brother..i try to make my site with this login script

          Comment


            #6
            please if possible could you add a register to this script????????????????????????? please and maybe an admin panel that can automatically create users either of them is acceptable

            Comment


              #7
              You can edit most reg script mate ;) not hard thou
              Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
              Visit: WapMasterz Coming Back Soon!
              _______
              SCRIPTS FOR SALE BY SUBZERO
              Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
              FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
              _______
              Info & Tips
              php.net
              w3schools.com

              Comment


                #8
                please i am awaiting your response

                Comment


                  #9
                  im not making a admin page ok
                  Attached Files
                  Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                  Visit: WapMasterz Coming Back Soon!
                  _______
                  SCRIPTS FOR SALE BY SUBZERO
                  Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                  FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                  _______
                  Info & Tips
                  php.net
                  w3schools.com

                  Comment


                    #10
                    ok thanks i really appreciate

                    Comment


                      #11
                      but there sign up and login there it is easy to see how it works

                      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                      Visit: WapMasterz Coming Back Soon!
                      _______
                      SCRIPTS FOR SALE BY SUBZERO
                      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                      _______
                      Info & Tips
                      php.net
                      w3schools.com

                      Comment


                        #12
                        ok, you are a GURU @ subzero

                        Comment


                          #13
                          but please if possible all i need is a an admin panel that can view users account and create users!!!! just simple


                          :
                          Welcome Admin to your portal


                          Create New Account
                          View Active Account
                          Delete Account
                          Logout


                          Please @subzero help me

                          Comment


                            #14
                            i will make it simple not all done coding ok.
                            Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                            Visit: WapMasterz Coming Back Soon!
                            _______
                            SCRIPTS FOR SALE BY SUBZERO
                            Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                            FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                            _______
                            Info & Tips
                            php.net
                            w3schools.com

                            Comment


                              #15
                              ok thanks

                              Comment

                              Working...
                              X