Take a look at this demo: http://jquery.bassistance.de/validate/demo/milk/
There is a link to the php source at the bottom:


<?php
$request = trim(strtolower($_REQUEST['value']));
$users = array('asdf', 'Peter', 'Peter2', 'George');
$valid = 'true';
foreach($users as $user) {
    if( strtolower($user) == $request )
        $valid = 'false';
}
echo $valid;
?>


Jörn

On Mon, Feb 23, 2009 at 6:12 PM, Sonya <ayson...@googlemail.com> wrote:
>
> For remote validation, please show a code of check-email.php. I did
> not find any example. My code:
>
> $email=$_POST['email'];
> $existing_mails=array('ma...@example.com','ma...@example.com');
> if (in_array($email, $existing_mails)) {
>        echo false;
> } else {
>        echo true;
> }
>
> does not work. Can you please show just small example of php code you
> wrote for the demo mentioned here
> http://docs.jquery.com/Plugins/Validation/Methods/remote#options
>

Reply via email to