in reply to Re: Hand Rolled CGI/Sendmail
in thread Hand Rolled CGI/Sendmail

I can't print any of the info obtained from the user. The HTML form accepts the input, the "Submit" button works, an email is sent to my clients Inbox, but when the email is open, the field titles (i.e.-Name:, Address:, etc) are there but none of the text the user inputs into the text fields are printed into the email.
Can you refresh me on how to check for failure of the Open,Close, and new CGI

Replies are listed 'Best First'.
Re: Re: Re: Hand Rolled CGI/Sendmail
by sgifford (Prior) on May 07, 2004 at 20:56 UTC
    You can't print user input to either the mail message or in the response HTML page? Are you sure you're getting the information, then? Try printing $query->Dump somewhere and see if the CGI object has in it what you expect.

    As for error checking, using or die "error..." should do the trick:

    my $query = new CGI or die "Couldn't create CGI object!\n"; open(MAIL, "|/usr/sbin/sendmail -t") or die "Couldn't start sendmail: $!\n"; close(MAIL) or die "Error closing sendmail: $!, exit status $?\n";
      Thank you so much for your time and wisdom...I'll give it a try!
      It still does not have the user entered text; and when I check open, close, the script still runs, (again no user entered text) and the same errors come up in my log file as before.
      For some strange reason the personal info requested is still not being sent. ARRGGHH.
      Could there be an issue on the server side as this is being run through an ssl for my client's visitors safety.