PHP/MySQL user/login script needed. Ideas?

Discussion in 'Web Design and Development' started by Dimwhit, Apr 29, 2008.

  1. macrumors 68000

    Dimwhit

    Joined:
    Apr 10, 2007
    #1
    Hey all,

    I'm going to be setting up a new website for my company, and I'm going to be needed a site-wide user registration/login system. I have one that I found online and modified a bit for my current site, but it's not particularly robust. I could probably adapt it. But I'm wondering if anyone knows of a good, reasonably-easy to install system. I don't mind paying a little bit if needed, either.

    Any ideas or suggestions?
     
  2. macrumors 65816

    italiano40

    Joined:
    Oct 7, 2007
    Location:
    NY
    #2
    i would hire a freelance programmer to create one, and you can find one on rentacoder.com
     
  3. thread starter macrumors 68000

    Dimwhit

    Joined:
    Apr 10, 2007
    #3
    Well, I could create one. I just don't want to re-invent the wheel. And it would take me quite some time.
     
  4. macrumors 65816

    italiano40

    Joined:
    Oct 7, 2007
    Location:
    NY
  5. macrumors member

    nomade

    Joined:
    Dec 2, 2006
    #5
    Try this :

    <?php
    session_start();
    include('coor.php');
    $username=$_POST['user'];
    $passw=$_POST['password'];
    $query="SELECT * FROM login WHERE user='$username' AND password='$passw'";
    $result=mysql_query($query, $connect) or die('error making query');
    $affected_rows = mysql_num_rows($result);
    if($affected_rows == 1) {
    $_SESSION['user']=$username;
    header('location:index.php');
    }
    else {
    header('location:loginAdmin.php?erreur=erreur');
    }
    ?>
     
  6. macrumors 604

    thejadedmonkey

    Joined:
    May 28, 2005
    Location:
    Pa
    #6
    The input isn't validated, and there's no encryption.
     
  7. macrumors 68040

    elppa

    Joined:
    Nov 26, 2003
    #7
    Login script, say hello to SQL injection.
     

Share This Page