Welcome Guest ( Log In | Click here to Register a free account now! )
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.![]() ![]() |
Nov 1 2007, 01:33 AM
Post
#1
|
|
![]() Member ![]() ![]() Group: Members Posts: 139 Joined: 6-July 06 From: O.C. Member No.: 74,928 |
|
|
|
|
Nov 1 2007, 07:31 AM
Post
#2
|
|
![]() Hail Groovicus! ![]() ![]() ![]() ![]() ![]() ![]() Group: Site Admin Posts: 6,453 Joined: 5-June 04 From: Vermillion, SD Member No.: 689 |
You would use some form of regular expression matching. But that still doesn't guarantee that they will give you a valid email address because "bozosrus@csu.fullerton.edu" would pass the same test that a valid address would. So the other option is that once they sign up, you send them a validation e-mail to which they have to respond before they can actually use the account.
-------------------- |
|
|
|
Nov 1 2007, 10:13 PM
Post
#3
|
|
![]() Member ![]() ![]() Group: Members Posts: 139 Joined: 6-July 06 From: O.C. Member No.: 74,928 |
ok I will look that up, yeah I planned on doing the validation email :-)
|
|
|
|
Nov 2 2007, 07:33 AM
Post
#4
|
|
![]() Hail Groovicus! ![]() ![]() ![]() ![]() ![]() ![]() Group: Site Admin Posts: 6,453 Joined: 5-June 04 From: Vermillion, SD Member No.: 689 |
If you are doing a validation email, then there is no need to check anything. Either they give a proper email address and get the validation link, or they do not give a proper address and do not get a validation link.
EDIT: Of course, that doesn't answer your original question. You can use javascript to initially check that the the address contains the required @csu.fullerton.edu, but all it will be checking isthat the address contains the proper domain. The regular expression used to match it is pretty simple. I nabbed this code from some random page and modified it. I did not test it, but it should be close: CODE function checkMail() { var x = document.forms[0].email.value; var filter = /^([a-zA-Z0-9_\.\-])+\@(csu.fullerton.edu)$/; if (filter.test(x)) alert('YES! Correct email address'); else alert('NO! Incorrect email address'); } This code only checks the address. It does not pass on the string if it is valid. There are tons of code samples for form validation, so you should have no problem finding something that works. On the server side, you will just need something to generate the validation email, and then a form that recognizes when a validation link has been clicked. Is it the back-end mechanism that you are asking about? -------------------- |
|
|
|
Nov 9 2007, 12:00 AM
Post
#5
|
|
![]() Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 489 Joined: 6-August 06 From: USA Member No.: 79,661 |
You could also use php to validate any inputs(requires host that supports php, and possibly database), then store all your info in a database for later retrieval(sending emails out). However if you do plan on saving user information please remember
1.) protect against database injections, xss, csrf ect. 2.) always encrpyt user information(if being stored), hashes and salts to prevent anyone outside from atleast understanding your stored info There are many means to the end, you might just want to do a little online research first. This post has been edited by ussr1943: Nov 9 2007, 12:06 AM -------------------- "Ideas are far more powerful than guns."
"The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards -- and even then I have my doubts." --Eugene H. Spafford "One man's terrorist is another's freedom fighter" |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 8th January 2009 - 10:26 PM |