View Full Version : Multiple Passwords?

07-26-2011, 05:29 PM
Ok, I have no idea how to really even explain what's been asked of me, but it's seems to me that this could be a bit beyond my knowledge.

We're creating an alternate reality game which starts with a series of questions that people can choose from two answers. The answers will determine which path the person will travel. They'll be given a password at the end of the series of questions. There are three possible paths, which means three possible passwords given.

On the same page, beneath the questions would be a text box with a "submit" button. The password they are given would be typed in there, and then they'd proceed to the proper page. This keeps from people being able to "skip" the questions portion. What they'd proceed to next is a video which is currently being made for our event, which has hidden puzzles and clues in it to find the next password. Rinse and repeat...

My problem? How the heck do I make that box and submit button and password all work together when I have more than one password? Even more so, how do I make the password/submit button direct someone to the correct URL (without revealing the URL, and also prevents anyone from copying the URL and sharing it to bypass the password request)?

For example:

Questions are complete and the password "invention" is given.

The person types in the word invention and presses submit. It directs the to www.url.com/game1 automatically.

While someone else will come in, answer the questions, and the password "intelligence" would be given.

That person types in the word intelligence and presses submit into the same box, using the same button that the person who typed in the word invention typed in. But this person would instead be directed to www.url.com/game2

If either person shared the link they were directed to, then it'd prompt people to put in a password before letting them in.

How in the darn world do I make this happen?? LOL!

Thanks in advance for any time, advice, or tutorials provided!

---------------------------------------- Added later....

I might need to go ahead and ask this as well.. since it got me to thinking..

How would I go about hiding the URL as well. I'm only interested in doing it for the game side of the site to keep from people sharing that URL and stripping the "fun" away from the game. Hopefully it is something simple? I'm fairly new at coding. My knowledge is no where as vast as I see many others here are. So if you should decide to have the patience to assist me, please be specific in steps like you are describing this to your kid who has no idea what you're talking about. I hate to present it that way, but I don't want to annoy anyone by stating I don't understand. :(

Philip M
07-26-2011, 05:41 PM
Passwords using Javascript are hopelessly insecure as the user can simply use View Source to inspect them. Likewise URLs. It is possible to obfuscate them to some extent, but even so anyone familiar with Javascript will be able to quickly crack them. You need to use server-side coding.

To answer your question:-

if (password == "invention") {dothis()}
if (password == "zamboni") {dothat()}
if (password == "intelligence") {dosomethingelse()}

But I have to say that I get the impression that you are trying to do something which is beyond your skills and abilities at present.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

07-26-2011, 06:40 PM
But I have to say that I get the impression that you are trying to do something which is beyond your skills and abilities at present.

This is an understatement. LOL! I am intently trying to learn, research, and comprehend and feel like I've got a brick wall in my brain refusing information to penetrate and retain.

I cannot believe I forgot about view-source. I use it frequently to learn with, and just entirely forgot it allows for passwords to be found very easily. Thank you for pointing that out. Now I need to figure out what you just said to me and what it means. At least it gives me a place to start.

Any ideas on the other portion of my question, by chance? :)

Philip M
07-26-2011, 07:51 PM
Any ideas on the other portion of my question, by chance? :)

If that was how to stop the user viewing an URL, see my answer at Post #2.
You need to use server-side coding. I have the idea that is completely beyond you at the moment. Computer programming in any language cannot be learned in a few days, weeks or months.

07-27-2011, 02:38 PM
Well, I appreciate the small tip you gave for me to go hunt for further information anyway. In the mean time, I am still adamantly trying to learn. So far, I've taught myself everything else that I know. I figure if you have the drive, you can learn as fast as you want. But I'm a bit of an optimistic too. LOL Never hurts to ask and see who's willing to share knowledge either. It's refreshing to not run into pretentious jerks who withhold knowledge just to feel bigger and smarter. I sincerely appreciate your time! At least now I know what to ask for in help down the line! :thumbsup: