BellaBuffs-PHPMailer/contactform/functions.php

20 lines
373 B
PHP
Raw Normal View History

2024-06-26 10:22:23 +00:00
<?php
function redirectWithError($error)
{
$_SESSION['_contact_form_error'] = $error;
header('Location: '.$_SERVER['HTTP_REFERER']);
echo "Error: ".$error;
die();
}
function redirectSuccess()
{
$_SESSION['_contact_form_success'] = true;
header('Location: '.$_SERVER['HTTP_REFERER']);
echo "Your message was sent successfully!";
die();
}