Jump to content

Password value


dave

Recommended Posts

Alright hers my delema: I'm building a password application to test my friends to see if they can crack the code. When they crack the code i want it to go to the second similar but harder application. I know some desent html and i'll show you the code i already have:

<html><body><body bgcolor="lightblue"><h1 align="center"> Daves Password challenge.<form>Password: <input type="password" name="password" <value="1jkh34k"> </form><form><input type="button" value="Enter Password"></form><form>

Thats the code i have but im not sure if i made the value for my password correctly. So if you can tell me were and how to input the href i would be thankful.

Link to post
Share on other sites

Here's what it should look more like:

<form>Password: <input type="password" name="password" value="1jkh34k"> <input type="button" value="Enter Password"></form>

although, setting the value to something seems kinda weird... if you want to check what password they entered in the box, you have to use either javascript or php.

Link to post
Share on other sites

Here you go, if this is what you want.

<html><head><script type="text/javascript">var password="put the password here"var secondurl="put the second url's location here. Remember the 'http's!"var message="put the congratulations message here."function checkPass(){if(document.forms.myForm[0].value=password){alert(message)window.location=secondurl}else{alert("Sorry, you didn't guess it! Try again!")}}</script></head><body bgcolor="lightblue"><form name="myForm"><input type="password"><input type="button" value="Submit" onclick="checkPass()"></form></body></html>
The red parts are the parts that you can change.
Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...