¿Cómo puedo solucionarlo?
Muchas gracias
Código :
<?php
if(isset($_POST["enviar"])){
$asunto="email del formulario";
$msg="nombre:".$_POST['nombre']."\n";
$msg="apellidos:".$_POST['apellidos']."\n";
$msg.="email:".$_POST['email']."\n";
$msg="direccion:".$_POST['direccion']."\n";
$msg.="telefono:".$_POST['telefono']."\n";
$msg.="fax:".$_POST['fax']."\n";
$msg.="comentario:".$_POST['comentario']."\n";
if(@mail("[email protected]",$asunto,$msg)){//la @ silencia los mensajes de error.
$error="?><html>
<head><title>Kopidenda</title>
<style type="text/css">
body {background-color:#666;
font-family:"Lucida Sans Unicode", Arial, Helvetica, sans-serif;
font-size:10pt;
color:#090;
}
#kutxa{ width: 400px;
height: 70px;
position:absolute;
top:50%;
left: 50%;
margin-top: -150px;
margin-left: -180px;
}
</style></head>
<body><div id="kutxa">gracias por contactar con kopidenda...</br></br>
<a href="contacto.html">volver a la web</a>
</div>
</body>
</html><?php";
}else{
$error="problemas tecnicos. Intentalo mas tarde";
}
}else{
header('location:presupuesto.php'); //si no se ha enviado el form, para echar de esta pagina y volver al formulario
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<?php
echo $error;
?>
</body>
</html>
