Hey everyone...
I have a .PHP code for a simple contact form on a website:
I want to know how to turn the echos into a pop up dialog box after the user clicks submit, rather than have it go to a blank page saying the text that's there.
Can someone help me?
(p.s. I am NOT very good with PHP)
I have a .PHP code for a simple contact form on a website:
Code:
<?php
if(isset($_POST['submit'])) {
$to = "email@emailsite.com";
$subject = "SUBJECT HERE";
$Name_field = $_POST['Name'];
$Phone_field = $_POST['Phone'];
$Email_field = $_POST['Email'];
$Comments = $_POST['Comments'];
$body = "From: $Name_field\n Phone Number: $Phone_field\n E-Mail: $Email_field\n Comments: $Comments\n";
echo "Thank you for your interest. We will respond as soon as we can.";
mail($to, $subject, $body);
} else {
echo "We're sorry. There appears to be an error. Please try again later.";
}
?>
Can someone help me?
(p.s. I am NOT very good with PHP)
Comment