Tengo un formulario (html), desde donde, después de rellenar una serie de campos, llama a un php, al que le pasa las variables, para que éste envíe un correo con los datos en cuestión.
Bien ... pues el problema está en que no me lo envía, no lo he podido probar, ya que lo ue me hace el nacehagor es preguntarme si me lo quiero guardar en disco o abrir (me refiero al archivo php), y si le digo abrir, me ejecuta el Dreamweaver ...
¿Qué estoy haciendo mal?
Os pongo los códigos...
- El formulario....
Código HTML:
<form name="stecnico" ACTION="stecnicoemail.php" METHOD="GET"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="middle"> <td width="30" height="20"> </td> <td width="175" height="20" class="ParrafoAzul">APELLIDOS Y NOMBRE </td> <td height="20"><input name="nombre" type="text" id="nombre" size="50"></td> </tr> <tr valign="middle"> <td height="4"> </td> <td height="4" class="ParrafoAzul"> </td> <td height="4"> </td> </tr> <tr valign="middle"> <td width="30" height="20"> </td> <td width="175" height="20" class="ParrafoAzul">DIRECCIÓN Y TELF. </td> <td height="20"><input name="direccion" type="text" id="direccion" size="50"></td> </tr> <tr valign="middle"> <td height="4"> </td> <td height="4" class="ParrafoAzul"> </td> <td height="4"> </td> </tr> <tr valign="middle"> <td width="30" height="20"> </td> <td width="175" height="20" class="ParrafoAzul">CORREO ELECTRÓNICO</td> <td height="20"><input name="correo" type="text" id="correo" size="50"></td> </tr> <tr valign="middle"> <td height="4"> </td> <td height="4" class="ParrafoAzul"> </td> <td height="4"> </td> </tr> <tr valign="middle"> <td width="30" height="20"> </td> <td width="175" height="20" class="ParrafoAzul">MODELO MÁQUINA</td> <td height="20"><input name="modelo" type="text" id="modelo" size="50"></td> </tr> <tr valign="middle"> <td width="30" height="20"> </td> <td width="175" height="20" class="ParrafoAzul">DESCRIBA SU INCIDENCIA </td> <td height="20"> </td> </tr> <tr> <td width="30"> </td> <td colspan="2"><textarea name="descripcion" cols="57" rows="5" id="descripcion"></textarea></td> </tr> <tr> <td width="30"> </td> <td colspan="2"><div align="right"> <div align="right"><br> <input type="submit" name="nombre" value="Enviar"> <br> </div></td> </tr> </table> </form>
Código PHP:
<?php
$nombre=$_GET['nombre'];
$direccion=$_GET['direccion'];
$correo=$_GET['correo'];
$modelo=$_GET['modelo'];
$descripcion=$_GET['descripcion'];
$tipo="plano";
$correoneoclima="[email protected]";
if ($correo!=""){
if ($tipo=="plano"){
$mensaje = "<html><head><title>Envío desde la web de NEOCLIMA - Servicio Técnico</title></head><body>Interesado: ". $nombre . "<br>Dirección: " . $direccion . "<br>email: " . $correo "<br>Modelo: <br>" . $modelo . "<br>Asunto: <br>" . $descripcion . "</body></html>\n";
mail($correoneoclima,"Correo enviado desde la web.", $mensaje,"Content-type: text/html\n","FROM:".$correo."\n");
} else {
// Envio en formato HTML
mail($direccion,"Ejemplo de envio de email","<html><head><title>WebEstilo. Manual de PHP</title></head><body>Ejemplo de envio de email de HTML<br><br>WebEstilo.<br>http://www.webestilo.com/<br> <u>Manuales</u> para <b>desarrolladores</b> web.</body></html>","Content-type: text/html\n", "FROM: Pruebas <[email protected]>\n");
}
echo "<div align='center' class='Parrafo'>Se ha enviado correctamente su mensaje a la direccion de PUERTO Y BAHIA.<br>En caso de ser necesario, nos pondremos en contacto con usted.<br>Gracias por su interés.</div>";
}
?>