Hey All,
I am writing a mail form in php where it takes the variables from flash and plugs them into the php form. The php script currently works however, I am trying to add a line break or two after 'yourname' before 'message' because right now it is just writing the input from yourname and message together.
For example: if the user inputs "Joe Smith" in the 'yourname' and "Hey" in 'message' I receive "Joe SmithHey". I have posted the code below. Any help would be greatly appreciated. Thanks.
<?php
// read the variables from flash
$subject = $_POST['subject'];
$message = $_POST['yourname'];
$message .= $_POST['message'];
$sender = $_POST['sender'];
// include IP in the message
$full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
$message= $full_message;
// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$subject = stripslashes($subject);
$sender = stripslashes($sender);
$yourname = stripslashes($yourname);
// add a prefix in the subject line so that you know the email was sent the online form
$subject = "Contact Form - ". $subject;
// send the email
if(isset($message) and isset($subject) and isset($sender) and isset($yourname)){
mail("myemail@example.com", $subject, $message, "From: $sender");
}
?>