| | #1 |
| HyperActive Warrior War Room Member Join Date: 2009
Posts: 167
Thanks: 49
Thanked 28 Times in 26 Posts
|
Can anyone point me to a simple password script or website that shows how to do something like this... The user is asked to enter a passcode. Let's say want to have 3 passwords..... If a user enters ABC they go to www.aa.com If a user enters DDD they go to www.dd.com If a user enters ZYZ they go to www.zz.com if no match they get an error message Thanks in advance. |
| Excel Help - Excel Expert Available To Assist You!
| |
| |
| | #2 |
| You reap what you sow. War Room Member Join Date: 2008 Location: Sometimes you don't.
Posts: 1,078
Thanks: 196
Thanked 411 Times in 243 Posts
|
It looks like this is not a username-password thing. You can accomplish a code-based redirection like this by adding some JavaScript to your page: HTML Code: <input type="text" id="code" placeholder="Enter Your Code"> <button type="button" id="enter">Enter</button> <div id="notice"></div> <script> var codes = { 'code1' : 'http://www.google.com/', 'code2' : 'http://www.youtube.com/', 'code3' : 'http://www.twitter.com/', }; document.getElementById('code').oninput = function() { document.getElementById('notice').innerHTML = '' } document.getElementById('enter').onclick = function() { var code = document.getElementById('code').value; if (code != '' && code in codes) { window.location.href = codes[code]; } else { document.getElementById('notice').innerHTML = '!! Invalid code entered.' } }; </script> |
| |
| The Following 3 Users Say Thank You to Nail Yener For This Useful Post: |
|
| Bookmarks |
| Tags |
| password, script, simple, system |
| |