MatthewV has asked for the wisdom of the Perl Monks concerning the following question:

I am using a script to pass post data to another html page that uses SSI (exec cgi) to call a perl script. My problem is I am not grabing the post data, since this is the first time I have done this and my google searching is not helping much I thought I would ask here. The perl code is this:
#!C:\Perl\bin\perl.exe use strict; use DBI; use CGI qw~:standard~; print "Content-type: text/html\n\n"; my ($DBH, $STH, @Address, $Contact); $Contact = param('Contact'); $DBH = DBI -> connect ('dbi:ODBC:SQLServer', ' ', ' ') or die "$DBI::e +rrstr"; $STH = $DBH -> prepare (qq~select ContactAddress from dbo.ContactAddre +ss where ID = '$Contact'~) or die "$DBI::errstr"; $STH -> execute or die "$DBI::errstr"; @Address = $STH -> fetchrow_array(); $DBH -> disconnect; print "$Contact"; print qq~<a href="mailto:$Address[0]>$Address[0]</a>~;

Replies are listed 'Best First'.
Re: Grabing post data via SSI?
by ig (Vicar) on Sep 01, 2009 at 00:46 UTC

    O'Reilly's CGI Programming might be a good resource for you. It says you can't pass arguments using exec cgi but you can using exec cmd.

      I was afread of that, thanks for the confirm.
Re: Grabing post data via SSI?
by Your Mother (Archbishop) on Sep 01, 2009 at 02:20 UTC

    I'm not clear what you're trying to do but you can include query args (depending on server configs) in SSIs this way: <!--#include virtual="/cgi-bin/moo.cgi?cow=guernsey;udders=oh-yeah"-->

    If you're trying to post something, you can set the form action to post to the real CGI and redirect or write HTML from there.

Re: Grabing post data via SSI?
by Anonymous Monk on Sep 01, 2009 at 00:31 UTC
    That is not SSI
      No shit, that is perl code. That is why I put "The perl code is:"
        Show then show the SSI and your form