hi guys,
i have registration form, where the user enters username, email id etc. on clicking register, the data should get validated and then get saved into the database. i got most of the validation stuff right exept this one. i did all the validations in javascript, i want the username to be unique, so what i did is, after posting all the data to php, i fetched every username from the table and compared it, when they are same echoed the javascript alert function. is this the right way of doing it??
or
can we compare the username before posting it to the php code(i mean in the javascript at the beginning of code in <head></head>), if so how do i fetch the username from table in javascript. pls explain with a example, so i get to know the syntax as well..
thank u..