Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/09/2005, 05:15
davidso
 
Fecha de Ingreso: septiembre-2005
Mensajes: 28
Antigüedad: 18 años, 7 meses
Puntos: 0
Mandar Tablas En Mails

A ver si alguien me puede decir por qué al recibir el mail solo me aparece el contenido de la variable suma. Es decir, la tabla donde tengo el pedido no me sale. Es quizás por algun problema de trabajo con las sesiones. Gracias

function manda_carrito(){
$cuerpo="";
$headers_mensaje = "From: [email protected]\r\n" . "Reply-To: [email protected]\r\n" . "Return-path: [email protected]\r\n" . "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1";
$cuerpo = '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
'.$suma = 0;
echo '<table border=0 cellpadding="5">
<tr>
<td><b>Código</b></td>
<td><b>Cantidad</b></td>
<td><b>Nombre producto</b></td>
<td><b>Precio</b></td>
<td><b>Total</b></td>
<td>&nbsp;</td>
</tr>';
for ($i=0;$i<$this->num_productos;$i++){
if($this->array_id_prod[$i]!=0){
echo '<tr>';
echo "<td>" . $this->array_id_prod[$i] . "</td>";
echo "<td>" . $this->array_cant_prod[$i] . "</td>";
echo "<td>" . $this->array_nombre_prod[$i] . "</td>";
echo "<td>" . $this->array_precio_prod[$i] . "</td>";
echo "<td>" . $this->array_precio_prod[$i]*$this->array_cant_prod[$i] . "</td>";
//echo "<td><a href='eliminar_producto.php?linea=$i'>Eliminar producto</td>";
echo '</tr>';
$suma += $this->array_precio_prod[$i]*$this->array_cant_prod[$i];
}
}
//muestro el total
echo "<tr><td></td><td></td><td><b>TOTAL:</b></td><td> </td><td><b>$suma</b></td><td>&nbsp;</td></tr>";
//total más IVA
echo "<tr><td></td><td></td><td><b>IVA (7%):</b></td><td></td><td> <b>" . $suma * 1.07 . "</b></td><td>&nbsp;</td></tr>";

echo "<tr><td></td><td></td><td><b>R.E.(7%+1%):</b></td><td></td><td> <b>" . $suma * 1.08 . "</b></td><td>&nbsp;</td></tr>";
echo "</table>"; '
</body>
</html>
';
mail("[email protected]","Nuevo Pedido",$cuerpo,$headers_mensaje);
}