The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Simple Password Verification
UNST3RBLICH
post Apr 4 2015, 01:56 AM
Post #1





Group: Members
Posts: 1
Joined: 4-April 15
Member No.: 22,456



Hello,

I have a page on a site I'm putting together which has a riddle, and I am trying to put together a text entry box in which a specific value (I guess similar to a password) has to be entered correctly for it to be accepted and redirect to another page. If anything but the pre-defined value is entered, it will tell them to try again. I can't seem to find any tutorials which help me accomplish this; they all point towards basic form validation in the manner of name, email, etc values.

This is the gist of what I'm struggling to accomplish:

Text box which requires text entry. Pre-defined correct value is something like 'potatoes'. If this is entered and the Submit button is pressed, it will redirect to a new page. If anything else is entered, it will tell them to try again.

Any insight or assistance would be greatly appreciated. I've been up for the last few hours trying to hash out what I thought would be a simple thing, but the method alas eludes me.

Thank you,

- UNST3RBLICH
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Apr 4 2015, 05:16 AM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Do you want this done on the server-side (PHP, ASP, etc.) or client-side (Javascript)? Will this page be available on the web or is it for internal use only? If done on the client-side then some users can have Javascript disabled or can view the source to find the password. Server-side would make more sense, in which case basic form validation samples should work fine, just reduce the fields to 1 text field, if that is all you need. Validation can check the password provided and either re-direct (if password is correct) or can return the same page with some kine of invalid password text warning.

Write some code and if you have problems then post the code and question here for help.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 10:34 PM