Jump to content

Problem with Username Checker


dizzy1

Recommended Posts

Alright ive made a register which allows me to check if the username already exists that works fine.

 

BUT i need to get it so if it doesnt exist the form doesnt submit.

 

javascript

 

function checkUsername ( form )
{

}

 

html

 

<form action="test.php" method="post" onsubmit="return checkUsername (this);"> 

<input type="text"  name="txtbox1" onblur="checkUser(this.value);" 	   
/> 

<div id='RegisterResult'></div>

</form>

 

The RegisterResult brings back if the username is avaliable or unavaliable from another page but how can i bring back a 0 or 1 in javascript so i know if it avaliable or not.

 

Link to comment
https://forums.phpfreaks.com/topic/152312-problem-with-username-checker/
Share on other sites

Not a huge ammount,

 

so far what it does is:

 

1.User Types in Textbox, onblur.

2.Checks Database.

3.Displays If it USERNAME already exists in DB.

 

 

what i need is:

4.Variable with YES in OR NO.

 

 

Then when i submit i can call the javascript fuction to check if Username=YESS and if so RETURN TRUE.

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.