Could anyone tell me how I can make sure that when a new customer is set up, that they provide a username and password that is unique, and not already in the database?
You could perform a query that selects that username from your table with users. If this query returns any rows, that means that the username already exists. //Daniel
I'm not really sure how to code that, I know what I want it to say!
If Username>0
then message "Sorry, that username is taken"
else
Insert into Customer...
I would want them to enter this username and password when they register as a customer, so they enter their address, telephone number and email at the same time. I have a bit of javascript that runs onClick of the submit button. This checks that there are values in each of the text fields, and also checks validates the password by entering it twice etc.
How would I run this query before inputing all the otehr data into the db?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.