samedi 30 juillet 2016

Fix the white blank page after form is processed

Here is a PHP script i wrote just so i can get information sent to me from my portfolio. For some reason its not showing the end script echo's. displays a white page and no email is being sent? I looked around and didn't see anything.

    <?php
$name = $_POST['c_name'];
$email = $_POST['c_email'];
$ref = $_POST['c_ref'];
$message = $_POST['c_message'];
$submit = $POST['f_submit'];

$from = 'From: Portfolio';
$to = 'user@email.com';
$subject = 'Website Request';

$body = "Name: $namen
         Email: $emailn
         Reference: $refn
         Message: $messagen";

if ($_POST['f_submit']) {
        if ($name != '' && $email != '') {
                if (mail ($to, $subject, $body, $from)) {
                    echo "Thank you for your quote we will be contacting you within 24 hours!";
                }else{
                    echo "Unfortunatley something went wrong try entering your information one more time.";
                }
        }
}


?>

Aucun commentaire:

Enregistrer un commentaire