#1 [PHP] Formulario de contacto, no envia el mail
Yo quiero que desde mi pagina web se me pueda mandar mensajes, por eso cree una pagina de contacto con un formuario, y un php para ke me los envie por mail... ya tengo el php, y tengo el formulario... pero el mail nunca me llega.
aca estan los dos codigos, a ver si alguien ve algo mal y me puede ayudar (soy medio newbie, nos e me caguen de risa
)...
EL de la pagina HTML
El PHP
se me soluciono el problema ya... siquieren cierren el topic
aca estan los dos codigos, a ver si alguien ve algo mal y me puede ayudar (soy medio newbie, nos e me caguen de risa
)...EL de la pagina HTML
Código:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Página Oficial de Sant'</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style>
<link href="textarea.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style11 {
font-size: 18px;
font-weight: bold;
font-family: Constantia;
color: #FFFFFF;
}
#scroll {
position:absolute;
left:72px;
top:62px;
width:688px;
height:508px;
overflow:auto
}
-->
</style>
<link href="scroll.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style12 {color: #FFFFFF}
.style13 {
font-family: Constantia;
font-weight: bold;
color: #FFFFFF;
}
-->
</style>
</head>
<body>
<div id="scroll">
<p align="center" class="style11"><span class="style11"><img src="contact.png" alt="Concact Logo" width="362" height="122" /></span></p>
<p align="center">
<FORM ACTION="contact.php" method="post" name="form1">
<table align="center" border="0">
<td align="left" width="100"><span class="style13">Name:</span></td>
<td align="center" width="410"><div align="left">
<input name="nombre" type="TEXT" value="" size="45" maxlength="42" />
</div></td>
<tr>
<td align="left" width="100"><span class="style13">Email: </span></td>
<td align="center" width="410"><div align="left">
<input name="mail" type="TEXT" value="" size="45" maxlength="42" />
</div></td>
</tr>
<tr>
<td align="left" width="100"><span class="style13">Subject:</span></td>
<td align="center" width="410"><div align="left">
<input name="motivo" type="TEXT" value="" size="65" maxlength="75" />
</div></td>
</tr>
<tr>
<td align="left" width="100"><span class="style13">Message: </span></td>
<td><textarea name="mensaje" rows=10 cols=65>
</textarea></td>
</tr>
<tr>
<td height="26" widht="100"></td>
<td align="right" width="410"><div align="center">
<input name="submit" type="SUBMIT" value="Enviar" id="submit" />
</div></td>
</tr>
</table>
</FORM>
</div><img src="block1.png" width="815" height="605" border="0" />
</body>
</html>
Código:
<?php
if (isset($_POST['submit'])) {
// We get all the variables
foreach ($_POST as $key=>$value) {
if ( gettype( $value ) == "array" ) {
//print "$key == <br>\n";
} else {
//print "$key == $value<br>\n";
$key = $value;
}
}
$message = "Contacto desde SantiagoPasarin.com.ar\n" .
"\nNombre: " . $nombre .
"\nEmail: " . $email .
"\nMotivo de contacto: " . $motivo .
"\nMensaje: " . $mensaje;
$to = 'pasarin.santiago@gmail.com';
$subject = '$motivo';
$headers = "From: $mail\r\n";
mail($to,$subject,$message,$headers);
} else {
echo 'Mensaje enviado correctamente. Santiago se pondra en contacto con usted pronto.';
}
?>
0