Featured Worklog

Price Search



PC Apex Sponsor


PC Apex Sponsors



PC Apex RSS Feeds

RSS Feed for PC Apex Reviews & ArticlesRSS Feed for PC Apex PC Modding WorklogsRSS Feed for the PC Apex Daily DisturbanceRSS Feed for the latest PC Apex Site NewsRSS Feed for PC Apex Affiliate and Web NewsRSS Feed for PC Apex Deals and Steals

Go Back   Apex Community Forums // Other Forums // Designers Corner // Coding / Scripting / Programming

Coding / Scripting / Programming Discussions on all manner of coding and scripting.

Reply
 
LinkBack Thread Tools Display Modes
Old 21-October-05, 12:43 AM   #1 (permalink)
Apex Techie Lite
pp79wc's Avatar
Question Creating User Logins

Is it possible to set up HTML to require user logins to access certain features?
pp79wc is offline     Reply With Quote
Old 21-October-05, 08:19 AM   #2 (permalink)
Apex Master Tech Apprentice
mrcracker's Avatar
Default

Check out this link, and oldie but a goodie, at least for the concepts behind logins and html:

http://www.webthing.com/tutorials/LOGIN1.html
mrcracker is offline     Reply With Quote
Old 21-October-05, 02:38 PM   #3 (permalink)
'Da Doctor of Funk
FunkyFresh's Avatar
Default

Quote:
Originally Posted by pp79wc
Is it possible to set up HTML to require user logins to access certain features?

To do it right, you'd need a server-side scripting language like PHP or ASP. Your web host would have to support explicitly support it; most free ones don't. Who's your web host?

If your host doesn't support any server-side stuff, you could have some weak "looks like security" using only HTML and JavaScript. Here's how:
  1. Create a page with the HTML below. Let's say it's called "login.htm".
  2. In the same directory as that page, create a subdirectory to hold your private stuff. Let's say the subdirectory name is "secret".
  3. Have the main page in that subdirectory be named index.htm or default.htm or whatever your host sets as the default document.
  4. When a user accesses login.htm, they'll be prompted for a password, at which point they enter the directory name. If they enter "secret", they'll be taken to your protected directory. If not, they'll get a 404 Not Found error.

Keep in mind this method has all the security of a screen door, so don't go using it to protect your bank account number or anything. The reason it would work at all is that nobody would know to look for it. Once someone from another site links to it, it could start showing up in Google and be public to the world.

HTML Code:
<html>
<head>
<script language="JavaScript">
<!--
function askForPassword() {
  location = prompt('Enter Password:', '');
}
//-->
</script>
</head>
<body onload="askForPassword();">
</body>
</html> 
I kept it simple for the example, but you could have a more official-looking login page that works the same way (using a textboxes instead of a prompt), so it wouldn't be quite so obvious it's only using Javascript.
FunkyFresh is offline     Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enable Mutiple Remote Logins on XP THRiLL KiLL Anything Goes 2 04-October-06 02:10 PM
XP user problem - adding admin user vortecfiero Other PC Problem / Help 1 05-September-06 11:47 AM
Creating a bootable DVD Graham_uk Windows OS Problems 5 07-January-05 02:36 PM
Creating A Vcd RAY Other PC Problem / Help 6 12-August-03 12:50 AM
creating a VCD? me_john85 Other PC Problem / Help 0 10-March-03 09:06 PM


All times are GMT -5. The time now is 04:10 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright PCApex.com, GameApex.com, ForumApex.com 2001 - 2008
Advertisements

Page generated in 0.13141 seconds with 9 queries