Webmaster Key - Discussion Forums


Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2012, 11:02:15 AM

Login with username, password and session length
Welceome to Forums!

Important information for guests and new members:

In order to understand the full benefits of becoming an active member of this forum, please review the following information on guest and new member restrictions. These forum changes have been prompted by an overwhelming and unreasonable amount of bot postings and incoherent guest spam messages. We wish to prevent these events from happening in the future and make our community a more comfortable place for all of our members.

For guests:

Guests are not allowed to open new topics, polls, or posts attachments.
If you wish to open up new discussions on this forum, we encourage you to register.

For new members:

New members with less than five posts are not allowed to modify additional profile information such as avatars, contact information, biographies, and signatures. However, new members are encouraged to post their own topics or reply to topics initiated by other members. Become active on the forums and 5 posts should be an easy task!

We are a diverse community with members from all over the world. We encourage new ideas and interesting conversation. Do not be afraid to post webmaster/computer-related questions or problems, as our active members are always willing to help when they are able. Interested? Join us.

+ Webmaster Key Forums
|-+ Webmaster Corner
| |-+ Site Design and Web Authoring
| | |-+ Coding Talk
| | | |-+ More Password protection help needed
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print
Author Topic: More Password protection help needed  (Read 4098 times)
ExecDec
Limited Member

Posts: 5


« on: March 01, 2006, 04:48:27 AM »

First of all,thanks for the forum.  I have found a ton of neat information that I will someday use.  For now, I need some help creating an intial home page that contains a password entry box that then links to my index page...which contains the rest of my page links. 

I am extremely new to webdesign, self taught so far, and I am using yahoo webhosting services. (kinda embarrassed at his point).  If anyone has an html code that I can enter into the home page, and then have it direct to my other pages that will simply have strange (unguessable) names...as mentioned in another thread.

Thanks for the help.

Greg
Report to moderator   Logged
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #1 on: March 01, 2006, 12:31:24 PM »

Hi Greg,

this code with a few tweaks may do the job:

Code:
<form onsubmit="window.location.href=this.url.value">
<input name="url" type="password" /><button type="submit">Enter URL</button>
</form>
Report to moderator   Logged

ExecDec
Limited Member

Posts: 5


« Reply #2 on: March 02, 2006, 01:10:53 AM »

Can I then replace "window.location.href=this.url.value" with my home page address.  And replace "password"  with whatever password I want?

I want it to go to my home page (e.x. www.url.com/index.html), other codes I have used send me to www.url.com/index.html?url=password, which does not work.. Any suggestions?

Thanks!

-Greg
Report to moderator   Logged
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #3 on: March 02, 2006, 07:34:17 AM »

Sorry the first code didn't work  Tongue

I tested this and it seems to work ok:
Code:
<form name="myform">
<input name="url" type="password" /><input type="button" onClick="location.href=document.myform.url.value" value="Enter URL" />
</form>

The "password" above specifies a password entry box rather than "text" for a standard text entry box.
Report to moderator   Logged

ExecDec
Limited Member

Posts: 5


« Reply #4 on: March 03, 2006, 03:27:50 AM »

Well, thanks for the code.  Can you now tell me which part to replace my website home page with?  And which part I change to customize my password choice?  Thanks!

Greg
Report to moderator   Logged
ExecDec
Limited Member

Posts: 5


« Reply #5 on: March 03, 2006, 04:33:20 AM »

To give a bit more info before anyone replies:

I am lauching my new website, in which I do not want my competitors to see.  If I can make my initial page (index.html) contain a password entry box and button, so that if they enter the correct password (which I will only give to my clients), they will be directed to my next webpage that contains all of the links to my other pages.  If they enter the incorrect password, they are directed to a void webpage.  I am using the follwing codes, but even if you put in the wrong password, you still get in!

code:
<form name="pp" action="http://www.mywebsite.com/homepagegyf5425.html">
<input type="pass" name="pass">
<input type="submit" value="Log In">
</form>

Any suggestions on what I am missing?  I don't believe my yahoo web hosting service (elementary, I know) allows stuff like .htmaccess or whatever that is.  Is this even possible? Oh, as you mentioned doing before Andy, my webpages have very unique/unguessable names, so that they cannot bypass staright to seomthing like  www.mywebsite.com/home.html.
Report to moderator   Logged
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #6 on: March 03, 2006, 11:50:06 AM »

LOL

the way my code works is:

the visitor enters the secret url into the box and clicks the button. They are then redirected to the secret page.

If the password is xcvsfdg/ for example, they are redirected to yoursite.com/xcvsfdg/index.html or whatever index page is in that directory.

How about, something along the lines of this instead (untested):
Code:
<form name="myform">
<input name="pass" type="password" /><input type="button" onClick="location.href=document.myform.pass.value+'.html' " value="Enter Password" />
</form>

This should add .html to the password entered and redirect to the appropriate page. The code I am using is javascript which I hate so if it doesn't work please learn about javascript and modify the code  Grin

HTML cannot process data input like you are asking. But javascript can, but it's easily visible by your competition so you can't include the actual passwords in your code. You have to use a server-side scripting language like php instead.
Report to moderator   Logged

ExecDec
Limited Member

Posts: 5


« Reply #7 on: March 04, 2006, 02:55:30 AM »

This worked perfectly!  I just made my homepage name the same as the password, so I can change it anytime I want, and have it virtually unguessable.  I've got several of these throughout the site now.  Thanks again for the help!

Report to moderator   Logged
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #8 on: March 04, 2006, 04:08:55 PM »

Hi ExecDec, glad you like my solution! I really hoped it worked to avoid me any more pain coding in Javascript  Grin I made sure I separated the single quote and double quote with a space to save alot of confusion  Cheesy
Report to moderator   Logged

Pages: [1] Go Up Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print 
+ Webmaster Key Forums
|-+ Webmaster Corner
| |-+ Site Design and Web Authoring
| | |-+ Coding Talk
| | | |-+ More Password protection help needed

Jump to:  
« previous next »


Our Partners
RelmaxTOP Ranking System Web Hosting RelmaxTOP Ranking System
Staff Sites
12Noon[12Noon Gallery] Andy[Urgentclick]
Tamuril[Tamuril's Digital Art Exhibit] Sensovision
Powered by MySQL Powered by PHP We are hosted by Relmax Inc. |Our Privacy Policy | Sitemap
Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
Forum design by Tamuril © 2005.
Valid XHTML 1.0! Valid CSS!