Well, to look at the actual AJAX response, you can use Firebug for Firefox to see it. You're suppose to have your remote page return "true" if it's good and "false" if it's not okay.
Looking at your code, both username and email validation checks have the same url and data. Ideally, you're suppose to pass the inputted username and email data to that URL for your remote script to check your database again those values, and return "true" or "false". On Aug 7, 3:12 pm, Miket3 <miketro...@gmail.com> wrote: > I need a way to debug what is being returned when I use the REMOTE > option. I cant get the validation to give me an error class when a > duplicate is found. here is my lookup.php which works perfectly fine > when I use jquery $get to call it. > > Lookup.php > <? > $noheaders = "true"; //prevents config.php from loading any header > data such a scripts and styles. > include("config.php"); > $table = $_GET["table"]; > $key = $_REQUEST["key"]; > $value = $_REQUEST["value"]; > $failmsg = (isset($_GET["failmsg"]) ? $_GET["failmsg"] : $value.": Not > Found in TABLE: ".$table." for KEY: ".$key); > $foundmsg = (isset($_GET["foundmsg"]) ? $_GET["foundmsg"] : $value.": > Found in TABLE: ".$table." for KEY: ".$key); > $sql="SELECT * FROM $table WHERE $key='$value'" ; > $result=mysql_query($sql); > if (mysql_num_rows($result) > 0) { > echo $foundmsg;} else {echo $failmsg; }; > > ?> > > Here are my rules: > var validator = $("#myform").validate({ > rules: { > username: { > required: true, > minlength: 4, > type: "GET", > remote: > "lookup.php?table=members&failmsg=true&foundmsg=false" > }, > password: { > required: true, > minlength: 5 > }, > email: { > required: true, > email: true, > type: "GET", > remote: > "lookup.php?table=members&failmsg=true&foundmsg=false" > } > }, > messages: { > > Thanks, > Mike