Hello,
I have a schript in php for sending and validation for a form. I used the script a couple of times, without any problems. But now I get this:
Warning: strlen() expects parameter 1 to be string, array given in … on line 1975
The error lays in the second line
$ph_section = “user template”;
if (strlen($PHORM_ALERTTO) && !strlen($PHORM_TO) && !$PHORM_INFONLY && !$ph_GotData) {
$PHORM_TO = $PHORM_ALERTTO;
settype($PHORM_TO, “array”);
}
if (isset($PHORM_TMPL) && isset($PHORM_TO) && !$ph_Abort) {
if ($ph_debug2) echo “JS: Mail Template(s)
”;
if (count($PHORM_TMPL) > $ph_MaxTMPL) $ph_Alerts['120'] = ph_Message("A120");
list(,$fPHORM_TO) = each($PHORM_TO);
list(,$fPHORM_SUBJECT) = each($PHORM_SUBJECT);
while ($ph_MaxTMPL-- && list($ph_key, $lPHORM_TMPL) = each($PHORM_TMPL)) {
if ($lPHORM_TMPL == ph_GENERIC) $lPHORM_TMPL = "$ph_root/files/generic.txt";
else $lPHORM_TMPL = "$ph_tpd/$lPHORM_TMPL";
$ph_Message = "";
$ph_Headers = "";
$ph_NonHeader = "";
$lPHORM_TO = "";
$lPHORM_FROM = "";
$lPHORM_SUBJECT = "";
$lPHORM_HEADERS = "";
$ph_TemplateHeaders = false;
if (ereg("(.+) +\+h$", $lPHORM_TMPL, $ph_regs)) {
$lPHORM_TMPL = trim($ph_regs[1]);
$ph_TemplateHeaders = true;
}
if ($ph_debug8) echo "Mail Template <B>$lPHORM_TMPL</B><BR>";
if (!$ph_Template = @implode("", file($lPHORM_TMPL))) {
$ph_Alerts['005'] = ph_Message("A005");
if ($php_errormsg) $ph_Alerts['005P'] = "%%%: $php_errormsg";
continue;
}
Can someone please help me?