Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

HTML Form not workin

by zak100 (Initiate)
on Oct 28, 2013 at 07:24 UTC ( #1059944=perlquestion: print w/ replies, xml ) Need Help??
zak100 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have written some CGI scripts using PERL. they are working. But now I want to create a HTML form. I have got a code. I saved it as login.html in my APACHI's cgi-bin directory. But when i am trying to load HTML page using  http://localhost/cgi-bin/ it is not working. I am getting following message
Internal Server Error The server encountered an internal error or misconfiguration and was u +nable to complete your request. Please contact the server administrator, admin@localhost and inform th +em of the time the error occurred, and anything you might have done t +hat may have caused the error. More information about this error may be available in the server error + log.
My HTML code is:
<!doctype html> <HTML> <HEAD> <TITLE> Login Page </TITLE> </Head> <BODY> <Form method="post" action="login.pl"> <TABLE BORDER ="0"> <TR> <TD> User Name</TD> <TD><input type="text" name="username" value=""></TD> </TR> <TR> <TD>Password </TD> <TD><input type="text" name="password" value=""></TD> </TR> <TR><TD COLSPAN="2" ALIGN="RIGHT"> <input type="submit" name="submit" value="login"> </TD></TR></TABLE> +</FORM><BODY></HTML>
Somebody plz guide me. Zulfi.

Comment on HTML Form not workin
Select or Download Code
Re: HTML Form not workin
by jakeease (Friar) on Oct 28, 2013 at 07:47 UTC

    Your last line of HTML, </FORM><BODY></HTML> is missing the slash in the </BODY> tag.

    For anything further, you'd need to post your Perl code.

      Hi, Thanks for your response. I have updated my code based on your advice but its still not working. My code is now:
      <HTML> <HEAD> <TITLE> Login Page </TITLE> </Head> <BODY> <FORM method="post" action="login.pl"> <TABLE BORDER ="0"> <TR> <TD> User Name</TD> <TD><input type="text" name="username" value=""></TD> </TR> <TR> <TD>Password </TD> <TD><input type="text" name="password" value=""></TD> </TR> <TR><TD COLSPAN="2" ALIGN="RIGHT"> <input type="submit" name="submit" value="login"> </TD></TR></TABLE> +</FORM></BODY></HTML>
      I have now stored it (login.html) in htdocs folder of Apache server where index.html resides. If i try:
      http://localhost/index.html
      It works. But if i try:
      http://localhost/login.html
      I am getting following error:
      Not Found The requested URL /login.html was not found on this server. Its not working. Plz guide me.
      Zulfi.

        Are the permissions for your login.html file set correctly?


        What can be asserted without proof can be dismissed without proof. - Christopher Hitchens, 1949-2011
Re: HTML Form not workin (cgi-bin is not for html, its for cgis)
by Anonymous Monk on Oct 28, 2013 at 08:38 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1059944]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-12-26 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (175 votes), past polls