Bueno ya esta hecho el formulario, ahora queria saber para cuando me envian el mail en vez de que salga [correo eliminado] queria que me salga el mail de la persona que completo el formulario.
el php es este:
<?
// Autor: Xavier Perera
// Mail: [correo eliminado]
// Año: 2008
$idc = $_POST['idCliente'];
$nom = $_POST['Nombre'];
$ape = $_POST['Apellido'];
$emp = $_POST['Empresa'];
$dom = $_POST['Domicilio'];
$loc = $_POST['Localidad'];
$pro = $_POST['Provincia'];
$pai = $_POST['Pais'];
$tel = $_POST['Telefono'];
$fax = $_POST['Fax'];
$mai = $_POST['Mail'];
$zip = $_POST['zip'];
$productos = "";
foreach($_POST as $nombre => $valor){
$esta = strpos($nombre, "lista_prod");
if ($esta === FALSE){
}
else
{
$productos = $productos . $valor . "<br />";
}
}
$para = "arigrodriguez......"; //mail del receptor
$asunto = "Pedido: " . $nom;
$cabecera = "From: Pedido\r\nContent-type: text/html\r\n";
$com = convertir($_POST['Comentario']);
function convertir($val) {
$res = str_replace('
', '<br />', $val);
return $res;
}
$html = "
<html xmlns='
http://www.w3.org/1999/xhtml'>
<head>
<title>Cachi Kleim</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
</head>
<body class='centro'>
<table width='770'border='0' align='center' cellspacing='0' class= 'centro'>
<tr>
<td class='tablaArr' colspan='3' ><h1 class='titulo'> </h1></td>
</tr>
<tr>
<td class='tablaBordeIzq'> </td>
<td align='center' class='texto'><div align='center'>
<table border='1' width='500px'>
<tr>
<td><table align='center'>
<tr>
<td>Nombre:</td>
<td><b>" . $nom . "</b></td>
</tr>
<tr>
<td>Domicilio:</td>
<td><b>" . $dom . "</b></td>
</tr>
<tr>
<td>Provincia:</td>
<td><b>" . $pro . "</b></td>
</tr>
<tr>
<td>Ciudad:</td>
<td><b>" . $loc . "</b></td>
</tr>
<tr>
<td>C. P.:</td>
<td><b>" . $zip . "</b></td>
</tr>
<tr>
<td>Mail:</td>
<td><b>" . $mai . "</b></td>
</tr>
</table></td>
<tr>
<td colspan='2'><table width='100%' align='center' border='1px'>
<tr>
<td align='center'>Productos</td>
</tr>
<tr>
<td><b>" . $productos . "</b></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan='2'><table width='100%' align='center' border='1px'>
<tr>
<td align='center'>Comentario</td>
</tr>
<tr>
<td><b>" . $com . "</b></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
<td class='tablaBordeDer'> </td>
</tr>
<tr >
<td class='tablaAba' colspan='3'></td>
</tr>
</table>
</body>
</html>";
mail($para, $asunto, $html, $cabecera);
header('Location: pedidohecho.html');
?>