$value)
{
if (is_array($value))
{
$value = implode(",", $value);
}
$name = "$" . $key;
$code = str_replace($name, $value, $code);
}
$code = str_replace('$ipaddress', $_SERVER['REMOTE_ADDR'], $code);
return $code;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'layoutgrid1')
{
$mailto = 'info@lovetacare.org';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Website form';
$message = 'Values submitted from web site form:';
$success_url = '';
$error_url = '';
$eol = "\n";
$error = '';
$mail = new PHPMailer(true);
try
{
$subject = replaceVariables($subject);
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!validateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$mail->CharSet = 'UTF-8';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
if ($_FILES[$key]['error'][$file] == 0)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
}
else
{
if ($_FILES[$key]['error'] == 0)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$message = replaceVariables($message);
$message = stripslashes($message);
$mail->MsgHTML($message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
?>
A Reliable Friend
Loveta Home Care Services provides professional, trustworthy, and dignified home-based care for senior citizens. We partner with families to ensure their loved ones receive quality care, safety, and companionship while continuing to live comfortably and independently in their own homes.
______________________________________________________________________________
✔ Carefully vetted, trained caregivers
✔ Tailored care plans aligned to family expectations
✔ Ongoing supervision and quality assurance
✔ Respectful, confidential, and dependable service
Custom Packages: Quoted based on care needs, hours, and location
Get the latest updates and offers.