Cita:
La pregunta es, si el formulario incluye algún dato privado como una identificación, licencia de conducir... etc, que tan seguro es utilizarlo...? <?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$header = 'From: ' . $email . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";
$comments = "This message was sent by " . $name . ", with phone number " . $phone . " \r\n";
$comments .= "Submit by: " . $email . " \r\n";
$comments .= "Message: " . $_POST['comments'] . " \r\n";
$comments .= "Sent on " . date('d/m/Y', time());
$para = '[email protected]';
$asunto = 'Message from Website';
mail($para, $asunto, utf8_decode($comments), $header);
header("Location:mensaje.html");
?>
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$header = 'From: ' . $email . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";
$comments = "This message was sent by " . $name . ", with phone number " . $phone . " \r\n";
$comments .= "Submit by: " . $email . " \r\n";
$comments .= "Message: " . $_POST['comments'] . " \r\n";
$comments .= "Sent on " . date('d/m/Y', time());
$para = '[email protected]';
$asunto = 'Message from Website';
mail($para, $asunto, utf8_decode($comments), $header);
header("Location:mensaje.html");
?>