I have an update page for my users where they can edit their name, email and other info.
So far, they can edit everything. Including their email. They can enter an e
use validate library : http://docs.jquery.com/Plugins/Validation/Methods/remote
your javascript :
$("#yourFormId").validate({
rules: {
email: {
required: true,
email: true,
remote: {
url: "checkmail.php",
type: "post"
}
}
},
messages: {
email: {
required: "Please Enter Email!",
email: "This is not a valid email!",
remote: "Email already in use!"
}
}
});
checkmail.php:
if you use codeigniter means use checkmail.php as a controller function.. you can pass your $registeredEmails array values as $registeredEmails[] = "your query result which is in for loop".