You need to look at something like PHP and regular expressions for that. Perhaps head over to the PHP forum. Ideally, you can learn how to do this with a book like Codin' for the Web, which I recommend.
What I mean by securely is the user enters personal information into a mail form, they select "Submit" and the information travels securely to the web site database.
Bookmarks