Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Feb 2002
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    password validation in a form input (Frontpage 2003)

    Dear all,

    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.

    Thank you
    Edy

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    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.

    (Regarding my first sentence, it is possible in theory to use JavaScript to extract information from a server so that the user doesn't have to submit the whole page, but I fear this design cannot be secured very well.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •