captcha plugin problem.

captcha plugin problem.

Hi guys,
i have this code
Javascript:
[code]
$.validator.setDefaults({
submitHandler: function() { alert("submitted!"); }
});
$().ready(function() {

// validate signup form on keyup and submit
$("#joinusForm").validate({
rules: {
name: {
required: true,
minlength: 2
},
category:{
required: true
},
site: {
required: true,
url: true
},
email: {
required: true,
email: true
},
captcha: {
required: true,
remote: "action.php"
},

agree: "required"
},
messages: {
name: {
required: "Please enter a username.",
minLength: "Your username must consist of at least 2 characters."
},
category: {
required: "Please select a category."
},
site: {
required: "Please provide a web site.",
url: "Please insert a valid web site."
},
email: {
required: "Please insert a email andress.",
email: "Please insert a valid email andress."
},
captcha: {
required: "Please inser a correct captcha."
},
agree: {
required: "Please agree to term of service."
}
},
success: {
alert("Correct captcha!");
}
});

});

[/code]
This is the action.php
[code]
<?php
require_once '../functions.php';
$captcha = $_GET["captcha"];
If(CheckCaptcha($captcha) >= 1){
echo 'true';
} else{
echo 'false';
}
?>
[/code]
and this is the form
[code]
<form method="POST" id="joinusForm" action="">
<table>
<tr>
<td>Name</td>
<td><input type="text" name="name" class="input" id="name"></td>
</tr>
<tr>
<td>Site</td>
<td><input type="text" name="site" class="input" id="site"></td>
</tr>
<tr>
<td>Category</td>
<td>
<select name="category" class="input" id="category">
<option value="">Select</option>
<option value="webmaster">Webmaster</option>
<option value="fun">Funny</option>
<option value="graphics">Graphics</option>
<option value="utility">Utility</option>
<option value="other">Other</option>
</select>
</td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" class="input" id="email"></td>
</tr>
<tr>
<td>Captcha</td>
<td>
<img src="'.$this->root.'/captcha.png" alt="Captcha image">
<input type="text" name="captcha" id="captcha" class="captcha">
</td>
</tr>
<tr>
<td>Receive the newsletter.</td>
<td><input type="checkbox" name="newsletter" id="newsletter"></td>
</tr>
<tr>
<td>Please agree to our policy.</td>
<td><input type="checkbox" name="agree" id="agree"></td>
</tr>
<tr>
<td><input class="input" type="submit" value="Join Us!"></td>
</tr>
</table>
</form>
[/code]
Why control of captcha don't work?
Ah, i'm italian, sorry for my english



:wink: