Author: orstyles | Posted on: 6/19/2008 9:28:22 AM | Views : 435

Hi

I am creating a custom validator. I have a field called organisation and the other called username. I want the username to be the same as the organisation name the person enters automatically. this part works fine. what I now want is for the code  to check if the organisation name already exists in the database and if so instead of giving an error message it adds a number to the name to make it unique. I have done the code to check for existence but I don't know how to make it add numbers in ascending order. i am thinking some kind of loop but not sure. please include code samples as I am new at this. Thanks

e.g Person one enters  organisation name: St. mary    The code should check it it is there if so then automatically make the usermane St Mary1

e.g Person two enters  organisation name: St. mary     The code should check it it is there if so then make the userna ...

Go to the complete details ...