Hi all.

I am trying to write a simple login form. The first page is simply HTML with two text fields ( name and password ) with one submit button. This part is finished. The form action is a perl based CGI script that looks like this:
#!C:\perl\perl.exe -wT use strict; use CGI qw( :standard ); use CGI::Carp qw( fatalsToBrowser ); print "Content-type: text/html\n\n"; my $Name = param("Name"); my $Password = param("Password"); redirect("/login.html") unless param("Name");
The login.html form is in the apache htdocs folder and the perl script is in cgi-bin.Since I am still learning the nuances of writing CGI scripts, I am slightly puzzled as to why the browser does not display the login.html page if I don't insert into the Name field. I can only assume I need to to modify my httpd.conf file ( Apache 1.3.20 ) to handle both HTML and CGI based applications? If so, any help in doing so would be most appreciated. The text I am using to learn CGI isn't particularly good. ( i.e. many demos, few explanations ).

Thanks,
-Katie

In reply to Perl/CGI redirect. by DigitalKitty

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.