Forums

ASP

This topic is locked

Password Page

Posted 01 Dec 2006 11:38:14
1
has voted
01 Dec 2006 11:38:14 Richard Wood posted:
I am trying to password off the photo and video area of my site (www.brunelrugby.co.uk) because some of the content is not what we want other clubs and visitors to see. All I want it to do is to have one generic password for all users. This password would then allow them into the photos and videos section. It doesnt have to be secure at all really, just able to stop the casual viewer seeing anything they shouldn't. Is ASP right for this and if so how do i do it?

Replies

Replied 05 Dec 2006 11:39:22
05 Dec 2006 11:39:22 Lee Diggins replied:
Hi Richard

The most basic way:

1. Create a form with an input box for the password and submit button
2. On the form handler page, check the submitted value against the generic password. For this very low level of security you could hard code this password into your form handler page.
3. If the password is matched, create a session variable and set it's value to something you'll check for later and redirect to the photos/videos start page.
4. On each video/photo page you need to check for the existence of the session variable, if this doesn't exist, rediect the user back to the login page.

That's sort of about it really. If you need any help with the code, post back with what you're struggling with and we'll go from there.

Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>

Reply to this topic