email address already registered.
Dear Jason/Ray, Just as I thought the marathon was ending, more questions are raised. I have two here.
QUESTION 1
I've asked this question a while back, but I'm wondering has there been an update on setting it up since then.
I originally ask how the system could cope with a senario where a user registers with an email address, and the tries to register again with the same email. The email column in the mysql table is set to unique.
In the past I had to create a recordset - call it rsEmail and filter this recordset - 'email = form variable email', and then prepare a server behaviour where $totalRows_rsEmail was a number between -1 and 0.
This prevented the user from registering the email twice and avoided duplicate addresses. The problem for the user was that nothing seemed to happen on the page, when he entered a duplicate email - it just stayed on the same page with no message.
Then I recently spoke to a friend and he mentioned Ajax as a way of checking, but Jason said you didn't really cover that area.
I was studying the WebAssist Validation tools, and then I discovered a thing called 'Unique Database Value'. I've used it, along with a 'show if' message - 'email already exists' - and it seemed to work.
My question is, is this a secure or reliable way of checking for duplicate entries. What is the best way to check for duplicates and prevent their entry and give a message at the same time to the user?
QUESTION 2
As a follow on from the above, is there a way of dealing with the following situation. In my Registerion Form, the user (parent/team manager) registers, and he can add members to his family or team - first name, last name, email, phome, DoB, etc. The first name and last name are required, but the email and phone are not. However, the email is a unique field in the database table.
Because the email is not required, the parent/manager, does not have to complete the email field (the child may not have an email address). However, if another parent or team manager, registers another child who has no email address - the paremt/manager is prevent, because there is already a unique email in the system, even though it's a blank one.
Any solution to this senario?