Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7793115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:22:58+00:00 2026-06-01T22:22:58+00:00

Folks, Please check my code..am executing the below code by http://localhost/mycart/login.php?is_ajax=1&username=srini&password=srini Then am getting

  • 0

Folks, Please check my code..am executing the below code by http://localhost/mycart/login.php?is_ajax=1&username=srini&password=srini Then am getting this error even though passing valid user name and password. kindly help me thanks

mysql_num_rows() expects parameter 1 to be resource, boolean given in
C:\wamp\www\mycart\login.php on line 25 and username ‘srini’ and password ‘srini’ not found

<?php

$is_ajax = $_REQUEST['is_ajax'];
if (isset($is_ajax) && $is_ajax) {
       error_reporting(E_ALL ^ E_NOTICE);
    $uname = $_REQUEST['username'];
    $pword = $_REQUEST['password'];

    $uname = htmlspecialchars($uname);
    $pword = htmlspecialchars($pword);

    echo $uname;
    echo $pword;

     $con = mysql_connect("localhost", "root", "root");

    if (!$con) {

        die('Connection Failed' . mysql_error());
    }

    mysql_select_db("test", $con);

   $result = mysql_query("SELECT * FROM login WHERE L1 = $uname AND L2 = $pword");
   $num_rows = mysql_num_rows($result);
    if ($num_rows > 0)
        echo "success";
    else
        echo "username '{$uname}' and password '{$pword}' not found";


mysql_close($con);

}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:23:00+00:00Added an answer on June 1, 2026 at 10:23 pm

    Your result is probably false. Try this:

    $result = mysql_query("SELECT * FROM login WHERE L1 = '".$uname."' AND L2 = '".$pword."'");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update: fixed delta calculations in code, still the issue remains Folks, could you please
folks please see following code : #include <gio/gio.h> #include <sys/socket.h> //socket(); #include <netinet/in.h> //sockaddr_in
folks, if you dont mind please see following code : #include <glib.h> #include <gio/gio.h>
I have a php site which flows as shown below. Please note I'm leaving
Folks, Please does anyone know how to show a Form from an otherwise invisible
I'm a bit of a WPF newbie, so go easy on me please folks!
Folks, please advice is there are any free available package(s) for OAuth? I need
Folks, I tired all my PHP skills to extract domain name strings from a
http://jsfiddle.net/ykNJ8/ This is a vanilla implementation from the CDN, developing on localhost. I cannot
Hi folks would really appreciate your help in answering this rather involved question. Please

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.