![Pensando](http://static.forosdelweb.com/fdwtheme/images/smilies/scratchchin.gif)
script:
<?php
$cone =mysql_connect('localhost','user','password');
mysql_select_db('mibd');
//recoge
$nombre = $_POST['nombre'];
$nombreb = $_POST['nombreb'];
$apellido=$_POST['apellido'];
$empresa=$_POST['empresa'];
$cargo=$_POST['cargo'];
$fono=$_POST['fono'];
$email = $_POST['email'];
$comentario=$_POST['comentario'];
$fecha= time();
$idioma=$_POST['idioma'];
$sql = "INSERT INTO Contactos SET
Nombre='$nombre',
Apellido='$apellido',
Empresa='$empresa',
Cargo='$cargo',
Fono='$fono',
Email='$email',
Comentario='$comentario',
Fecha='$fecha',
Idioma='$idioma'";
if (@mysql_query($sql)) {
$status="ok";
echo "stat=" .$status. "&nom=" .$nombre."&ema=" .$email."&empre=" .$empresa."&fon=" .$fono."&";
$to=$email;
/* subject */
$subject = "Información recibida";
/* message */
$message = '
<html>
<head>
</head>
<body>
<div align="center">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="emailtop.jpg" width="544" height="64"></td>
</tr>
<tr>
<td bgcolor="#EEEEEE"><div align="center">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><p><font face="Arial" size="2">Estimado: '.$nombre.'</font></p></td>
</tr>
<tr>
<td><p><font face="Arial" size="2">He recibido tu información, estaré contáctandome contigo a la brevedad. </font></p></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td bgcolor="#EEEEEE"> </td>
</tr>
<tr>
<td><img src="emailbot.gif" width="544" height="2"></td>
</tr>
<tr>
<td bgcolor="#EEEEEE"><p align="right"><font face="Arial" size="1">www</font></td>
</tr>
</table>
</div>
</body>
</html>
';
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
//$headers .= "To: [email protected]\r\n";
$headers .= "From: [email protected]\r\n";
$headers .= "Bcc: [email protected]\r\n";
/* and now mail it */
mail($to, $subject, $message, $headers);
///fin
} else {
//$status=.mysql_error();
$status="mal";
echo "stat=" .$status. "&nom=" .$nombre."&ema=".$email."&";
}
?>