dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Login Script

Hybrid View

  1. #1
    Join Date
    May 2012
    Posts
    2

    Login Script

    I am new to php and I would like to know how to create a single page that only logged in users can access. As in, one page will have submit buttons on it, but you can only click those buttons if you register on the site. Where do I install log in scripts, and what will I need to download other than sql?

  2. #2
    Join Date
    Mar 2012
    Posts
    63
    create login and securepage ( Logged Members page)

    At secure page, after db connection. check the user is logged in and process the page based on the result
    --------------------
    For example
    -----------------

    /* securepage.php */

    dbconnection here

    function isUserLoggedIn()
    {
    // suppose you have a logged in user_id in session as $_SESSION['logged_user_id'];

    if($_SESSION['logged_user_id']!='')
    return true
    else
    header("location:login.php");

    }

    isUserLoggedIn();

    /-- Codes for the page --/

  3. #3
    Join Date
    Jun 2010
    Posts
    16
    You should be aware of the various security issues surrounding login pages. Perhaps it would be easier to use a library? Give this one a try. It looks interesting. http://php-login-script.com/

  4. #4
    Join Date
    May 2012
    Posts
    2

    but...

    Quote Originally Posted by dukesdemise View Post
    You should be aware of the various security issues surrounding login pages. Perhaps it would be easier to use a library? Give this one a try. It looks interesting. http://php-login-script.com/

    What is a library? The link you posted seemed like a normal sql login script tutorial, is a library something you don't need a login for?

  5. #5
    Join Date
    Jun 2010
    Posts
    16
    Hmm. Ok I'll give you a direct download link to the LIBRARY on the same site. Had you scrolled down a little bit further you would have seen it.

    http://php-login-script.com/php_login_v2.3.zip

    A library is a set of classes and functions that you can incorporate into your application. In this case its a library implementing a login. You'll just have to work it into your application if you wish to use it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles