PHP Form not returning blank page on submit

0
down vote
favorite
I have looked through posts with similar questions but am so new to PHP I still can’t seem to figure out how to fix my problem, so thank you for your patience!!

I did a tutorial on youtube to create my contact form, it works well (content transmits), however, once the submit button is hit a message is supposed to show up at the top of the page that says that the message was sent successfully or that something was wrong with the submission - instead it just goes to a blank page so people don’t know if the form has gone through or not. I can see that once the submit is hit that the url is showing up as www.communicatingwell.com/send.php when it should be still on www.communicatingwell.com/contact.php but from what I can see under Location it is pointing to contact.php so I’m not sure where the error is.

I’ve been trying to sort this out for weeks now and feel stumped. Hoping somebody might be able to give me some suggestions. Thank you!!!

The form is located here: http://www.communicatingwell.com/contact.php

css content in the head area of contact.php file:

<style type="text/css"> .success { color: #333300; margin-left: 15px; } .fail { color: #993300; margin-left: 15px; } </style>

From contact.php file:
[php]<?
$s=$_GET[‘s’];
if($s=“1”)
{echo('Your email has been sent to our web team. Please allow a 24 hour response time ');}
else if($s=“2”)
{echo('Sorry ! Your message has not been sent to our web team. Please fill the form correctly and try again ');}
?>[/php]

From send.php file:
[php]<?
$email = $_POST[‘email’];
$name = $_POST[‘name’];
$phone = $_POST[‘phone’];
$messages = $_POST[‘messages’];
$city = $_POST[‘city’];
$comments = $_POST[‘comments’];
$security = $_POST[‘security’];

$to = "[email protected]";
$subject = “New Contact Form Submission”;
$message = “A visitor of communicatingwell.com has submitted the following information.\n\nName: $name\n\nEmail: $email\n\nPhone: $phone\n\nMessages: $messages\n\nCity: $city\n\nComments: $comments\n\nPlease respond to this enquiry within 48 hours”;

if($security==“10”){
mail($to,$subject,$message);
header(“location:contact.php?s=1”);
}
else{
header(“location:contact.php?s=2”);
}
?>[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service