Skip to content Skip to sidebar Skip to footer

SMTP Contact Form Blank Screen On Submit

I've been having alot of issues with contact form, does anyone know why my code is just bringing up a blank screen with '(URL)/mail.php when i press Submit on my form. Here is my c

Solution 1:

It's not able to find the php mailer class class.phpmailer.php. Is it in the same directory as as the rest of the files..?


Solution 2:

I would move the header() call outside of the if() statement to make sure a person is ALWAYS redirected: think about what would happen if a person that manually visits yoursite.com/mail.php without using your form to POST data:

<?PHP
ob_start();
if(isset($_POST['btnSubmit']))
{
    // Mail stuff
}
header("Location: $redirect_url");
?>

Post a Comment for "SMTP Contact Form Blank Screen On Submit"