Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Banned
    Join Date
    Oct 2013
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts

    HTML Form problem

    Hi,
    I cant display my HTML form however its displayed when i open the file using google chrome. I have stored it in the htdocs folder of Apache where index.html resides but when i type
    Code:
    localhost/index.html
    It works. But when i type the url:
    Code:
    localhost/login.html
    It does not work. My hml form code of login,html is:
    Code:
    <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.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    What doesn't work, does it issue a 404 or another type of status code error?

    Don't forget as well to ensure that you are running via http:// protocol, and not via file:// protocol. I noticed you intend to submit to a perl script, so you'll likely require that the apache is configured to parse the perl code.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Banned
    Join Date
    Oct 2013
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi,
    Thanks for your response. It shows me following error:
    Code:
    Not Found
    
    The requested URL /login.html was not found on this server.
    It runs my perl scripts which are stored in cgi-bin directory using url:
    Its creating problems with HTML files. However it runs index.html

    Zulfi.

  • #4
    Banned
    Join Date
    Oct 2013
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi,
    Its giving me following error:
    Not Found

    The requested URL /login.html was not found on this server.
    However its running index.html file but not any another html file created by me.

    Zulfi.

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    That's a 404 error then.
    You'll need to verify your configurations for your httpd.conf and ensure that your document paths are pointing to where you are storing your document files.
    Once finished, restart the httpd daemon and try again.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • Users who have thanked Fou-Lu for this post:

    zak100 (10-30-2013)

  • #6
    Banned
    Join Date
    Oct 2013
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi,
    Thanks for providing solution to my problem. I remembered making changes in my httpd.conf while i was reading a tutorial. B/c of that i stored my html in a directory in 'D' drive and its working now.

    Zulfi.

  • #7
    New Coder
    Join Date
    Oct 2013
    Location
    Bangalore, Karnataka
    Posts
    43
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi,
    Thats not a problem and also just save the .php extension its easy to take an access,
    insert start<?php ?> end <?php ?>

  • #8
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Quote Originally Posted by sudhakar1 View Post
    Hi,
    Thats not a problem and also just save the .php extension its easy to take an access,
    insert start<?php ?> end <?php ?>
    Don't listen to this user.
    PHP files are only for if you are intending to use PHP code. Since your code is using HTML in one file and perl code in another, there is no relevance to the use of PHP code.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #9
    New Coder
    Join Date
    Feb 2014
    Location
    United Arab Emirates
    Posts
    14
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Friend you can simply just watch tutorial this is the best way for teach you every think.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •