Hi, i have a script problem as I am a graphic designer with zero php knowledge. I have a contact script that sends emails but they are blank. Meaning all text fields are not sending. If you could correct this for me thanks in advance. Here is my hacked up script that sends email with empty fields:
<!DOCTYPE html>
<html lang="en">
<?php
if (!count($_POST)){
?>
<form method="post" id="myform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
</form>
<?php
}else{
?>
<?php
$mail = $_POST['email'];
/*$subject = "".$_POST['subject'];*/
$to = "
[email protected]";
$subject = "Message from Digital ......";
$headers = "From: YourName <
[email protected]>";
$message = "Message from YourName\n";
$message .= "\nName: " . $_POST['Name'];
$message .= "\nEmail: " . $_POST['Email'];
$message .= "\nMessage: " . $_POST['Message'];
//Receive Variable
$sentOk = mail($to,$subject,$message,$headers);
}
?>
<!-- END SEND MAIL SCRIPT -->
</html>
This is all that sends:
Message from YourName Name: Email: Message: