Developer Support »

Getting a blank page when submitting the form  (See more user questions)

Hi .

The problem is this piece of code:

$html_open = "<html><head><title>$subject</title></head><body><table
cellpadding=\"".$table_cellpadding."\"
cellspacing=\"".$table_cellspacing."\"
bgcolor=\"".$table_background_color."\">"; $html_close = "</table><script
type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." :
"http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-13073183-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body></html>"; $content_type = "html";}else{$html_open = ""; $colon_sep =
": "; $html_close = ""; $content_type = "plain";}

Should be this:

$html_open = "<html><head><title>$subject</title></head><body><table
cellpadding=\"".$table_cellpadding."\"
cellspacing=\"".$table_cellspacing."\"
bgcolor=\"".$table_background_color."\">"; $html_close =
"</table></body></html>"; $content_type = "html";}else{$html_open = "";
$colon_sep = ": "; $html_close = ""; $content_type = "plain";}

You also have this:

$html_open =
"<html><head><title>$autoresponder_subject</title></head><body><p><font
face=\"".$autoresponder_font."\" size=\"".$autoresponder_font_size."\"
color=\"".$autoresponder_font_color."\">$autoresponder_header_message</font></p><table
cellpadding=\"".$table_cellpadding."\"
cellspacing=\"".$table_cellspacing."\"
bgcolor=\"".$table_background_color."\">"; $html_close = "</table><p><font
face=\"".$autoresponder_font."\" size=\"".$autoresponder_font_size."\"
color=\"".$autoresponder_font_color."\">$autoresponder_footer_message</font></p><script
type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." :
"http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-13073183-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body></html>";

Should be this:

$html_open =
"<html><head><title>$autoresponder_subject</title></head><body><p><font
face=\"".$autoresponder_font."\" size=\"".$autoresponder_font_size."\"
color=\"".$autoresponder_font_color."\">$autoresponder_header_message</font></p><table
cellpadding=\"".$table_cellpadding."\"
cellspacing=\"".$table_cellspacing."\"
bgcolor=\"".$table_background_color."\">"; $html_close = "</table><p><font
face=\"".$autoresponder_font."\" size=\"".$autoresponder_font_size."\"
color=\"".$autoresponder_font_color."\">$autoresponder_footer_message</font></p></body></html>";

The problem here is the extra code you have added. It contains double
quotes " which clash with the script code. You need to escape those double
quotes with a backslash, like this: \". I have done this for you and fixed
the script, attached.

I have an article about editing PHP code on my support section (including
escaping quotes) here:

https://formtoemail.com/developersupport/editing_php.php

You are also getting an error because the script cannot find your securimage
captcha files. Probably better to disable the securimage captcha until you
get the script working again. More info on the securimage error, here:

https://formtoemail.com/developersupport/securimage_captcha.php

I have disabled securimage captcha on your script, so it should work just as
it is.

Any questions, just let me know.

Best wishes.

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Wednesday, August 25, 2010 2:04 PM
Subject: Re: FormToEmail-Pro script


> Thank you so much for taking a look! I am attaching the file to this
> email.
> I have three other variations of that file on our website that aren't
> working either, but I guess it would probably be the same problem that is
> in
> the attached file...
>
> Thanks,
> On Wed, Aug 25, 2010 at 4:31 AM, FormToEmail.com
> <>wrote:
>
>> Hi .
>>
>> Glad you like the script...my pleasure to be of service!
>>
>> I'm pretty certain you will have a parse error on your script. If you
>> get
>> a blank screen, it usually means the script has crashed, which will only
>> happen if there's a fatal error on it.
>>
>> You will have made a mistake when editing it or it could have become
>> corrupt.
>>
>> Have a look at these pages on my support setion:
>>
>> https://formtoemail.com/developersupport/parse_errors.php
>>
>> https://formtoemail.com/user-questions/question_210.php
>>
>> If you send me your edited script, I will show you what is causing the
>> problem.
>>
>> Any questions, just let me know.
>>
>> Best wishes.
>>
>> Charles Sweeney
>> https://formtoemail.com
>> The world's easiest feedback script!
>>
>> ----- Original Message -----
>> Sent: Wednesday, August 25, 2010 1:45 AM
>> Subject: FormToEmail script
>>
>>>
>>> Comments: Love this script. It has been awesome...but since I've done a
>>> site redesign, I haven't been able to figure out for the life of me why
>>> it
>>> hasn't been working. I have the pro version, and everytime I try to
>>> submit
>>> a form, it just goes to a blank page. Please see what I mean by going
>>> to
>>> http://www.. I am stumped as to what
>>> the problem is...any help would be appreciated. Thanks!!!!