Results 1 to 2 of 2
2004-06-07, 08:56 #1
- Join Date
- Feb 2002
- Thanked 0 Times in 0 Posts
password validation in a form input (Frontpage 2003)
I want to develop a simple form in FP, where the user has to input a password before submitting. The password should be validated before submit against a password table. The password table would have two fields, username and password. If the user enters a wrong password the form should deny to submit.
I understand this is not possible with FP out of the box. It probably needs some coding.
I'm looking for some guidance.
2004-06-08, 17:12 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 93 Times in 89 Posts
Re: password validation in a form input (Frontpage 2003)
The best way to do this is on the server, using something like ASP. By default, FrontPage's database components will create ASP pages for you (at least they did when I used FP2000; nowadays, I'm not 100% certain). If you have Microsoft Access, you can use its query design tool to design a query to test the username and password and return a third field, such as a record number from the database (if the record was found) or no records (if the username and password are invalid). Then you can use Access's SQL view to copy the query code back over the FrontPage. I guess this is a little more complicated than I remembered.
Anyway, the important thing, if this is a public server, is not to tell the user whether it was the username or password that flunked. You don't want to make the job of hacking your site any easier. It's better to return a message such as "Invalid username and/or password" and let them wonder.