SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Login Form Help (I'm a php noob)

    http://paste.devpipe.com/1514

    Whats wrong with the code above? It works untill it has to query the database.. The mysql connection script is working fine so its something to do with this script!

    Thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2006
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $sql = mysql_query("SELECT * FROM tblUsers WHERE username = '".$username."' and password = '".$password."'") or die(mysql_error());

    $row = mysql_fetch_array($sql);

    if(mysql_num_rows($sql) < 1) {
    echo 'Sorry, user not found';
    }else{
    echo 'Success';
    }


Bookmarks

Posting Permissions

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