in reply to Re: Re: Premature end of script headers
in thread Premature end of script headers
That's pretty much what you'd expect running just that script by itself, because there's no form feeding it with information.
Here's a quick fix for your problem.
Start again.
Start with this code:
now all the values from your form are in a hash called "%in".use CGI; use CGI::Carp qw(fatalsToBrowser); CGI::ReadParse();
So if you've got a field called "Title", the contents are now easily accessed because they're in $in{'Title'}.
Note that there's a case-sensitivity issue here too. If your form field is called "title" then you need $in{'title'} instead.
You don't need to grab things from the hash and put them into variables, just grab them directly from the hash, i.e. do this
in your mail-sending code, rather than doing that bizarre "GETVALUES" thing which is just double handling. Skip that stage altogether. Just go straight to sending the mail.print MAIL "$in{'Title'}\n";
And the fatalsToBrowser thing will mean you get useful error messages.
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Premature end of script headers
by Nickd_69 (Novice) on Aug 08, 2003 at 01:54 UTC | |
by Cody Pendant (Prior) on Aug 08, 2003 at 04:14 UTC |