J
John
I am trying to teach myself enough about cgi to make a
proof-of-concept demo.
Proposition is that I can use a Web form to collect certain data for a
front end-system.
Not looking for a lesson in HTML. I've written C programs that, in
turn, write HTML.
Not looking for lessons in Perl, I think. I've just written a batch
e-mail collector in Perl.
I am looking for a lesson in relating my html to my Perl code. (If
this makes my question off-topic for this group, please send me in the
right direction).
I have searched the FAQs (didn't read them cover to cover) and have not
found the answer I am looking for. So please, if you flame, rip me for
misreading the FAQs, not for ignoring them.
I am working from a book, "CGI Manual of Style," a Ziff-Davis number by
Robert McDaniel.
Page 8 says:
"...when a Web server receives a request for a file contained in in the
subdirectory cgi-bin, it knows that the file is a cgi script and will
run it and return only output from the script.
So here's my page:
<HTML><TITLE>Test page</TITLE>
<BODY>
<FORM METHOD=POST ACTION="/cgi-bin/example.pl">
Line:<INPUT TYPE=text NAME=namedtext VALUE="today" SIZE=30>
<BR>
<INPUT TYPE=SUBMIT VALUE=Send>
</FORM>
</BODY>
And here's example.pl:
#!/usr/bin/perl -w
print "This is example.pl speaking";
When I hit submit, the address in the browser window changes
to".../cgi-bin/example.pl"
But I do not get "only output from the script." I get the whole
shebang, as it were, with the word "print" etc. in my browser window.
So what am I doing wrong?
A vague question perhaps, but I could do with a pointer to some reading
material. What would help even more would be five minutes worth of
eye contact with someone who's done this before. There are only
thousands of you. But I don't have that, so I throw myself on the mercy
of this group.
I am trying to work the example using the Web server supplied with Mac
OS X,10.3.8.
But If I make the internal sale with the demo, the target system would
be an NT or Linux machine.
proof-of-concept demo.
Proposition is that I can use a Web form to collect certain data for a
front end-system.
Not looking for a lesson in HTML. I've written C programs that, in
turn, write HTML.
Not looking for lessons in Perl, I think. I've just written a batch
e-mail collector in Perl.
I am looking for a lesson in relating my html to my Perl code. (If
this makes my question off-topic for this group, please send me in the
right direction).
I have searched the FAQs (didn't read them cover to cover) and have not
found the answer I am looking for. So please, if you flame, rip me for
misreading the FAQs, not for ignoring them.
I am working from a book, "CGI Manual of Style," a Ziff-Davis number by
Robert McDaniel.
Page 8 says:
"...when a Web server receives a request for a file contained in in the
subdirectory cgi-bin, it knows that the file is a cgi script and will
run it and return only output from the script.
So here's my page:
<HTML><TITLE>Test page</TITLE>
<BODY>
<FORM METHOD=POST ACTION="/cgi-bin/example.pl">
Line:<INPUT TYPE=text NAME=namedtext VALUE="today" SIZE=30>
<BR>
<INPUT TYPE=SUBMIT VALUE=Send>
</FORM>
</BODY>
And here's example.pl:
#!/usr/bin/perl -w
print "This is example.pl speaking";
When I hit submit, the address in the browser window changes
to".../cgi-bin/example.pl"
But I do not get "only output from the script." I get the whole
shebang, as it were, with the word "print" etc. in my browser window.
So what am I doing wrong?
A vague question perhaps, but I could do with a pointer to some reading
material. What would help even more would be five minutes worth of
eye contact with someone who's done this before. There are only
thousands of you. But I don't have that, so I throw myself on the mercy
of this group.
I am trying to work the example using the Web server supplied with Mac
OS X,10.3.8.
But If I make the internal sale with the demo, the target system would
be an NT or Linux machine.