PDA

Click to See Complete Forum and Search --> : Perl Problem


PSX
Jun 18th, 2001, 02:10 AM
I'm having a problem with this form to mail script, and I kept getting Internal Server Errors.

But then using:

use CGI;
use CGI::Carp qw/fatalsToBrowser/;

I was able to pinpoint the error which is:

Can't find string terminator "HTML" anywhere before EOF at /home/svgcnet/public_html/sc/subnews.cgi line 47.

I've kept trying to tweak the script a bit, but can't figure it. I've had problems like this before and tweaking it a bit helped, but now it doesn't make any sense as to why it won't work.

I have attached the CGI script.

scoutt
Jun 18th, 2001, 02:55 PM
I have a script that does something similiar to that. I looked at it and it doesn't use the exit; at the end. try taking it out and just have

HTML
}

and see what it does. other than that you can trying changing the name like this

print <<HTML_CODE;

code in here

HTML_CODE
}
becaus eit might have a conflict witht eh <html> part.

just a thought

PSX
Jun 18th, 2001, 10:17 PM
None of those suggestions seem to work. No matter I do, I always am getting the same error.

PSX
Jun 19th, 2001, 06:47 AM
Well, I managed to do it differently by using:

print "<html>";

instead of using the print HTML>>;

But another question has arisen. Rather than starta new thread, I'll do it right here since the question deals with the script I attached above. When the mail is sent, it includes the "Submit" field in the e-mail. I'd like to not included that in the printed e-mail. And no matter I try to do, it seems to keep coming up. It will appear or none of the fields appear in the e-mail based on the methods I have tried to prevent it. Also, is there a way to get rid of the "Sender" SendMail field? Because it always keeps coming up as nobody@someemail.com. I thought I remembered hearing about a way, but maybe I'm wrong...