Login system not working

Discussion in 'PHP' started by ViggoAvatar, Sep 25, 2015.

  1. #1
    23 $query = mysql_query("select * from login where password='$password' AND user='$username'", $connection);
    24 $rows = mysql_num_rows($result);
    25 if ($rows == 1) {


    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a6634782/public_html/checklogin.php on line 24

    Could somebody tell me my mistake please?
     
    Solved! View solution.
    ViggoAvatar, Sep 25, 2015 IP
  2. #2
    try this:

    $rows = mysql_num_rows($query);
     
    suraj kumavat, Sep 25, 2015 IP
  3. ViggoAvatar

    ViggoAvatar Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    did that, just before you posted it ^^, thankyou for the answer as it did work!
     
    ViggoAvatar, Sep 25, 2015 IP