Código PHP:
<?php
if (($nombre=="") || ($email=="") || ($mensaje=="")) {
header('location:http:/mail.html');
exit; }
$msg="estos son los datos recibidos\n";
$msg="Nombre :$nombre\n";
$msg="Email :$nombre\n";
$para="[email protected]";
$asunto="$nombre,Envio un mensaje";
mail($para,$asunto,$msg);
?>
lo hago de esta manera :
Código PHP:
<?php
if (($nombre=="") || ($email=="") || ($mensaje=="")) {
header('location:http:/mail.html');
exit;
if (!eregi("@",$email)) {
header('location:http:/mail.html');
exit;
}
}
else{
$msg="estos son los datos recibidos\n";
$msg="Nombre :$nombre\n";
$msg="Email :$nombre\n";
$para="[email protected]";
$asunto="$nombre,Envio un mensaje";
mail($para,$asunto,$msg);
}
?>