hdezela
05-21-2003, 04:04 AM
Well, after playing around with it for a while, I found three specific problems with this script:
1.- It never actually checked the database to see if the username was taken.
2.- It didn't record the user's password in the database.
3.- It didn't check to see if "Your Name" was entered.
I fixed that and also added a checkbox to act as an "I've read the bla bla and agree to it".
It now first checks the database to see if the user is in there, if not, it goes on with the script, else it gives an alert.
MAKE SURE YOU POPULATE THE DATABASE WITH THE EXISTING USERS, I HAVE NO IDEA WHAT WOULD HAPPEN IF YOU TRIED TO REGISTER SOMEONE WHO IS ALREADY THERE.
Then it checks the form in top-down order, ie:
1.- checkbox
2.- name
3.- alternate email
4.- password match
If all conditions are met, it creates an entry in the database with the user's data and creates an email box for the user.
Also, if my javascript is clunky, it's because this is the first time I have ever played with any programming at all. It's just I'm so proud of myself for gettting it to work that I had to share. :D
1.- It never actually checked the database to see if the username was taken.
2.- It didn't record the user's password in the database.
3.- It didn't check to see if "Your Name" was entered.
I fixed that and also added a checkbox to act as an "I've read the bla bla and agree to it".
It now first checks the database to see if the user is in there, if not, it goes on with the script, else it gives an alert.
MAKE SURE YOU POPULATE THE DATABASE WITH THE EXISTING USERS, I HAVE NO IDEA WHAT WOULD HAPPEN IF YOU TRIED TO REGISTER SOMEONE WHO IS ALREADY THERE.
Then it checks the form in top-down order, ie:
1.- checkbox
2.- name
3.- alternate email
4.- password match
If all conditions are met, it creates an entry in the database with the user's data and creates an email box for the user.
Also, if my javascript is clunky, it's because this is the first time I have ever played with any programming at all. It's just I'm so proud of myself for gettting it to work that I had to share. :D
