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

  • SEARCH
  • Home
  • 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 7870047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:30:06+00:00 2026-06-03T01:30:06+00:00

I am using the JQuery Validation Plugin. I got the remote function working with

  • 0

I am using the JQuery Validation Plugin. I got the remote function working with the default php file.

I modified the php file to use my own version but mysql is returning

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in    /home/fastbluf/syatch/module/1.func.php on line 15

My PHP Code is the following. All my syntax looks correct.

<?php
// Last Edited: 4/23/12
$conn = mysql_connect('localhost','hidden','hidden') or die('Iam dying');
$rs = @mysql_select_db( "hidden", $conn) or die( "Err:Db" );

$do = $_REQUEST['do'];
$email= $_REQUEST['email'];
$user= $_REQUEST['user'];

function checkInfo($do,$email,$user){
    switch ($do) {
        case 1:
            $sql = "select * from User_Base where Email_Address = $email";
            $results = mysql_query($sql). mysql_error();
            $nResults = mysql_num_rows($results);
            if ($nResults > 0) {
                $valid="false";
            } else {
                $valid="true";
            }
        break;

        case 2:
        //not yet 
        break;      
    }
    return $valid;
}
echo checkInfo($do,$email,$user);
?>
  • 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-03T01:30:09+00:00Added an answer on June 3, 2026 at 1:30 am

    The problem is that you’re appending to your result, causing it to no longer be a valid result.

    $results = mysql_query($sql). mysql_error();
    

    Try changing this to be something like this:

    $results = mysql_query($sql) or die(mysql_error());
    

    Your query should also be changed to quote the email address, and the address should be escaped to prevent attacks (SQL Injection):

    $email = mysql_real_escape_string($_REQUEST['email']);
    $sql = "select * from User_Base where Email_Address = '$email'";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a simple HTML file upload form. I'm using the jQuery validation plugin
I am using jquery validation plugin. I have an 'add file field' button which
I'm using: jQuery validation plug-in 1.6 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ with the latest version of jQuery.
i'm using this plug in to validate a form http://bassistance.de/jquery-plugins/jquery-plugin-validation/ I've got 3 fields,
Im trying to use the remote feature in the JQuery Validation Plugin to check
I am using jQuery Validation Plugin (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) I have wrote following rule jQuery.validator.addMethod(valueNotEquals, function(value,
I am using jquery validate engine plugin. I got the validation right so the
I'm using the jQuery Validation plugin and I've got a textbox with the class
I am using jquery validation plugin for validation. I am using one javascript function
I've got a little problem while using jQuery validation plugin in on my .net/MVC

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.