check if username/email is already exist using javascript
<p>i have a simple question.</p>

<p>how can i check if the username or email they entered is already exist..</p>

<p>i have this code,</p>

<pre><code>        if(document.RegForm.user.value =="")
        {
        alert("User Name Please?");
        valid=false;
        }
</code></pre>

<p>that's my code for username, i don't know what code i will add to check if user name is already exist.. :-(</p>

<p>hmm.. also this is for the email:</p>

<pre><code>        var emailExp= /^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
        strEmail=document.RegForm.eadd.value;

    if(strEmail.search(emailExp)==-1)
        {
        alert("A Valid Email Address Required");
        valid=false;
        }
</code></pre>

<p>what code will i add? to check if email is already exist. help me please .. :-(
thank you so much guys.. </p>
