Hello,
I have a problem, want to send an email with php everything is send fine with this code
<?php
$mail = $_POST['mail'];
$name = $_POST['name'];
$subject = $_POST['subject'];
$text = $_POST['text'];
$to = "filippos8@otenet.gr";
$message =" You received a mail from ".$mail;
$message .=" Text of the message : ".$text;
if(mail($to, $subject,$message)){
echo "mail successful send";
}
else{
echo "there's some errors to send the mail, verify your server options";
}
?>
but I want to send the variable $name text too in the message, how can I add this variable to $message?
this code sends only the $name and the text $message
<?php
$mail = $_POST['mail'];
$name = $_POST['name'];
$subject = $_POST['subject'];
$text = $_POST['text'];
$to = "filippos8@otenet.gr";
$message =" You received a mail from ".$mail;
$message =" You received a mail from ".$name;
$message .=" Text of the message : ".$text;
if(mail($to, $subject,$message)){
echo "mail successful send";
}
else{
echo "there's some errors to send the mail, verify your server options";
}
?>
, the subject both cases send correctly. I am a newbie in php.
Thank you
Kyriakos