i use bnb form
( [bignosebird.com...] )
on my site .
it works great and no problem with it .
But i want to change the look of the incoming messages which contains the visitors data from this default order :
On 2003-11-24 at 16:53:03,
The following information was submitted:
>From Host: 00.00.00.00
submit_to = qqq@qqq.com
Subject = qqqq
TitleName = qq
FullName = qq
Profession = qq
BusinessType = qq
CompanyName = qq
Website = [www....]
submit_by = qq@qq.com
Phone =
Fax =
Message = test test
to this one :
On 2003-11-24 at 16:53:03,
The following information was submitted:
>From Host( bold text ): 00.00.000.00
-------------------------------------------
submit_to ( bold text ): qq@qq.com
-------------------------------------------
Subject ( bold text ): qq
-------------------------------------------
TitleName ( bold text ): eng
FullName ( bold text ): qq
Profession ( bold text ):qq
BusinessType ( bold text ):qq
CompanyName ( bold text ):qq
Website ( bold text ): [www....]
---------------------------------------------
submit_by ( bold text ):qq@qq.com
Phone ( bold text ):
Fax ( bold text ):
---------------------------------------------
Message ( bold text ):
test test ( bold text ; color=blue or red )
---------------------------------------------
i think it will be easy to any one to read and more organized!
so how can i change the main script to have the second result?
thank you ..
I'm not familiar with the script, but a quick glance at the code shows there is a subroutine called
write_data that you would need to modify. Basically you would need to send an HTML content type and then wrap the text output in HTML tags and insert bold tags around the line item detail. I won't make any promises, but I think I can get you started. Find these two blocks of code in the write_data subroutine and comment out the old lines and key in the new lines (indicated here in bold):
if ($fields{'submit_to'} ne "") {
#$msgtext="";
$msgtext="Content-type:text/html\n\n";
$msgtext="<html><head><body>";
$msgtext .= "On $SD at $ST,\n";
$msgtext .= "The following information was submitted:\n";
$msgtext .= "From Host: $ENV{'REMOTE_ADDR'}\n";
}
foreach $to_print (@sortlist) {
if ($fields{'outputfile'} ne "")
{ print OUT_FILE "$fields{$to_print}\¦"; }
if ($fields{'submit_to'} ne "")
#{ $msgtext .= "$to_print = $fields{$to_print}\n"; }
{ $msgtext .= "$to_print = <b>$fields{$to_print}</b>\n"; }
}
if ($fields{'submit_to'} ne "")
{ $msgtext .= "</body></head></html>"; }