How to embedd cgi in html
- by neversaint
I have no problem executing a cgi file under the normal url like this:
http://www.myhost.com/mydir/cgi-bin/test.cgi
However when I tried to embedd it into HTML file (called index.html) like this:
<HTML>
   <BODY>
   <P>Here's the output from my program:
   <FORM ACTION="/var/www/mydir/cgi-bin/test.cgi" METHOD=POST>
   </FORM>
   </P>
   </BODY>
</HTML>
The CGI doesn't get executed when I do:
http://www.myhost.com/mydir/index.html
The CGI file (test.cgi) simply looks like this:
#!/usr/bin/perl -wT
use CGI::Carp qw(fatalsToBrowser);
print "Test cgi!\n";
What's the right way to do it?