• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

Help with Passwords

Hi

I'm new to web design and have designed a set of webpages for our local Fanasty Football league , one of these pages has a button to generate an e-mail to be sent to some people when transfers are due, but what I would like to do is when they click the button it opens a log in page and have to enter a password, and when this is entered then they can then open the e-mail.

Thanks

Chris
0
kempy316
Asked:
kempy316
  • 10
  • 8
  • 2
1 Solution
 
hhammashCommented:
Hi,

The email is a form, right?

- Who will access the email form?  how many persons?  do you want a password for each one?
- Do you want to save passwords in a database or in the page itself?
- Does your host support ASP and MS Access?

hhammash
0
 
kempy316Author Commented:
Hhammash

No the e-mail is just a button they click, 21 different people will need access, Yes I would like a password for each one.

My host does support MS Access, I would like to save the passwords in the page if possible but if it is easier to save them in a database then I would do it that way.

Chris
0
 
hhammashCommented:
Hi,

If your host does not support ASP and Access,  then you need to create a subweb and password protect it using Frontpage.

You host must support something,  either ASP and Access or PHP and MySQL or other scripting language with a database.

In Frontpage:

- Create a subweb
- Put the page you want as the index page in that subweb
- Select Tools > Server > Administration Home
- Go down to Subwebs
- Select Create a Subweb

http://www.experts-exchange.com/Applications/MS_Office/FrontPage/Q_21390984.html


Then you add users to that subweb and assign user names and passwords.

Here is a tutorial to do the whole thing.
http://frontpage-demos.12wonderwebservices.com/How-to-create-a-password-protected-subweb-in-FrontPage.html




0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
kempy316Author Commented:
My host does support MS Access
0
 
rcmbCommented:
kempy316,

Take a look at this PAQ and you will find the answer to your needs. This is a simple login process that does not require a subweb or database to login. You will be able to create a single login and password and then have it redirect to the email page.

http://www.experts-exchange.com/Applications/MS_Office/FrontPage/Q_20959639.html

RCMB
0
 
kempy316Author Commented:
RCMB

How do I amend the code to set a different password for each person.

Kempy316
0
 
rcmbCommented:
In this configuration it is not possible. you would need to integrate a database to get it to read multiple logins and passwords.

RCMB
0
 
kempy316Author Commented:
Thats what I need to then, because I have 21 different people who need to login in. Do you have any ideas how I go about this?
0
 
hhammashCommented:
Hi,

Since your host supports Access and ASP,  I can show you a way that you can create a passowrd login using the DRW and without the need to write any code.

We will do it via DRW (Database Results Wizard).

- We will create a database where you will put all usernames and passwords
- We will create a login form that posts to the DRW page
- We will create a DRW that has a SQL statement to wait for the username and passowrd
- The DRW will check the entered username and password against the database
- If the combination is right,  the email form will show up

In this case you can create hundreds of usernames and passwords.

hhammash
0
 
kempy316Author Commented:
Sounds perfect what do I need to do first
0
 
hhammashCommented:
Hi,

1- Create a database on your desktop
2- Create a table in it to have UserName and Password fields
3- Enter the UserNames and Passwords for your users manually.  You will have control over it
4- Import the database to your website
5- Give it the name you like when asked

Create the database connection
1- Tools > Web Settings > Databases
2- You will see the name of the database the you imported with a big blue question mark next to it
3- Click once on it
4- Click verity

Now you have a connection to your database

Let me know when you are done.

hhammash
0
 
kempy316Author Commented:
Hhammash

I have completed this part I have created the database on my desk top called password. I have entered the usernames and passwords.

Then imported the database and verity it.

Chris Kemp
0
 
kempy316Author Commented:
Hhammash

What do I need to next

Kemp316
0
 
hhammashCommented:
Hi Kemp316,

Now:

01- Open Fronptage
02- Open your website
03- Click once on FPDB folder
04- File > Import
05- Add
06- Browse to the database that you created on the desktop
07- Import,  now you will be asked to enter a name for your database
08- If you are asked to put the database in the fpdb folder,  agree to that
09- When finished,  you will see the database available in the fpdb folder
10- Go to Tools > Web Settings > Databases
11- Click once on the newly imported database
12- Click Verify
13- Ok

Now you will have the database ready and the connection ready for you to use with the DRW.

Let me know when you are done.

hhammash
0
 
kempy316Author Commented:
All Done
0
 
hhammashCommented:
Hi,

01- Create a new page and save it as Login.asp
02- Add a form in this page and put in it only two fields:  username and password.  Make sure that you name the form fields with exactly the same names that you gave the fields in the table.
03- Post the form to ValidateLogin.asp
04- Save the page again

Now you have a page that is called Login.asp which asks the users to enter a user name and password.  Then it sends the information to a page called ValidateLogin.asp.

Now we will create the ValidateLogin.asp page.  This page will validate the username and password entered in teh Login.asp page against the database.  This page will be a DRW.

01- Select Insert
02- Database > Results
03- Under use an existing database connection select the database name
04- Click Next
05- Under record source select the table name
06- Click Next
07- Now in step 3 of 5 you will see the UserName and Password fields listed,  
08- Click on More Options Button
09- Click on Criteria
10- Click on Add
11- In field name select Username
12- In comparison select Equals
13- In Value select Username
14- Click OK
15- Click Add again
16- In Field Name select Password
17- In Comparison select Equals
18- In Value select Password
19- Click OK
20- Click OK
21- Unselect Limit number of return records to 256
22- In Message to display erase the default message
23- Type:  Sorry,  can not validated the login
24- Click OK
25- Click Next
26- In step 4 of 5 under Choose formatting select List - one field per item
27- Uncheck add lables for all field values
28- Uncheck Place horizontal separator between records
29- Click Next
30- In step 5 of 5 uncheck Add search form
31- Click in the radio button Display all records together (if it is not already checked)
32- Click Finish

Now you have created the ValidateLogin.asp.  You will see two yellow areas and in between you will see the fields UserName and Passowrd in this format:
<<UserName>>
<<Password>>

UserName field should be above Passowrd field,  if it is not Highlight it,  Cut it, then paste is above <<password>>.

Now:
01- Take the cursor and place it at the end of passowrd after >>
02- Erase the word password by pressing the Backspace button on the keyboard
03- In place of the password type:  Proceed
04- Highlight Procees, right click, Hyperlink
05- Type the hyperlink of the page that has the email for or select it from your web
06- Click OK
07- Put the cursor before <<UserName>> then press enter to push it one line down
08- Above <<UserName>> type Welcome in big letters
09- Save the page again

Now the page will welcome the user name and show the hyperlink to the emailform.htm page.

If the login is not validated,  the hyperlink will not appear.


Creating the EmailForm.htm

01- Create a new page
02- Save it as EmailForm.htm
03- Put the fields that you want
04- Post the form to the email
05- Save the page
06- Switch to HMTL view
07- Before </head> tag put the followign Javascript code:

<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from old browsers<br>

if   (document.referrer != "http://www.YourWebsite.com/ValidateLogin.asp")
      location.href = "http://www.YourWebsite.com/Login.asp";
//-- Stop hiding script -->
</SCRIPT>

08- Save the page

This javascript code will look it the user is coming from the ValidateLogin.asp page it will open the form, otherwise the user will find himself in teh Login.asp page.

Hope it helps.

hhammash
0
 
kempy316Author Commented:
hhammash

What do mean by Post the form to ValidateLogin.ASp
0
 
hhammashCommented:
Hi,

Right click the form
Select Form Properties
Click Send to Other
Click Options
In Action Field type: ValidateLogin.asp
Ok, Ok, Ok
Save the page

hhammash
0
 
kempy316Author Commented:
HHammash

Once I done all this I can then post the pages to my website

Kemp
0
 
hhammashCommented:
Yes of course
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 10
  • 8
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now