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

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.
marquinezAsked:
Who is Participating?
 
ahoffmannCommented:
why use a CGI?
each reliable web server has this functionality build-in using simple .htaccess files
0
 
NopiusCommented:
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
 
Dushan De SilvaTechnology ArchitectCommented:
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
NopiusCommented:
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
 
VenabiliCommented:
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
 
Dushan De SilvaTechnology ArchitectCommented:
Is illegal to post internal EE PAQ links while answering questions? , which are perfectly matching quetioner's requirement

BR Dushan
0
 
VenabiliCommented:
>> 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
 
Dushan De SilvaTechnology ArchitectCommented:
I agreee. Thanks!

BR Dushan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.