[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

create a web page that asks for user name and password.

Posted on 2006-03-28
11
Medium Priority
?
203 Views
Last Modified: 2013-12-25
hello; I need to create a web page that validates a user name and password.  The first page should have two text boxes: one for the user name and one for the password and a button that says login.  Once the button is clicked the user name and password should be passed to a CGI script.  The script will check to see if the user name and password is located in a file.  If the user name and password are both located in a file then a page should display "Successful login".  If either the user name or password is wrong then the page should display "Unsuccessful login" and a link back to the login page. Could you help me?. Thank you.
0
Comment
Question by:marquinez
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 1000 total points
ID: 16323690
why use a CGI?
each reliable web server has this functionality build-in using simple .htaccess files
0
 
LVL 27

Assisted Solution

by:Nopius
Nopius earned 1000 total points
ID: 16495502
marquinez:
1) Select programming language for your CGI script
2) In your form use
<FORM action="your_script_name" method="post">
Username: <input type=text name=user>
Password: <input type=password name=pass>
<INPUT type="submit" value="Send">
</FORM>
read http://www.w3.org/TR/html4/interact/forms.html more for HTML form layout
2) In your script you will get 'user' and 'pass' variables. How? It depends of your programming language.
then check them against external source and do what you want
0
 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 16496393
0
Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

 
LVL 27

Expert Comment

by:Nopius
ID: 16705388
Venabili, Dushan911 also give good suggestion. And very good advice to search knowledge base before asking a question :-)
If marquinez uses Perl, these PAQs may be usefull.
Since we don't know what marquinez thinks, Dushan911 should also be included to split poiunts.
0
 
LVL 20

Expert Comment

by:Venabili
ID: 16706654
Well..
He made an internal search and posted two links without really explaining what is on them and so on.. It won't take too much tro post some explanations as well, will it?
0
 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 16707298
Is illegal to post internal EE PAQ links while answering questions? , which are perfectly matching quetioner's requirement

BR Dushan
0
 
LVL 20

Expert Comment

by:Venabili
ID: 16711435
>> Is illegal to post internal EE PAQ links while answering questions? , which are perfectly matching quetioner's requirement

No :) But basically when posting ANY link, it is better to post some information what is on it... It will make the question more readable. That's all

Up to the Mods how to close
0
 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 16714452
I agreee. Thanks!

BR Dushan
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question