Tema: Funcion Mail
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/08/2010, 08:12
Avatar de lair
lair
 
Fecha de Ingreso: enero-2009
Ubicación: header('Location: Morelia");
Mensajes: 1.052
Antigüedad: 15 años, 4 meses
Puntos: 46
Respuesta: Funcion Mail

Hola.

Por supuesto que puede ser php, para cuando el explorador interprete eso a sera html

y la mecanica seria como lo que tienes en el primer archivo

Código PHP:
Ver original
  1. <?php
  2. $total = $_POST['total'];
  3. for($x=0;$x<=$total;$x++){
  4.     if($_POST['checkbox_'.$x]=='1'){
  5.        
  6.         $cant = count($carro);
  7.         $carro[$cant]['id'] = $_POST['id_'.$x];
  8.         $carro[$cant]['cantidad'] = $_POST['precio_'.$x];
  9.     }
  10. }
  11.  
  12. $_SESSION['carro']=$carro;
  13.  
  14. $mensaje="
  15. <table width='500' border='1' cellpadding='1' cellspacing='1'>
  16.  <tr>
  17.    <th>Producto</th>
  18.    <th>Cantidad</th>
  19.    <th>Precio</th>
  20.    <th>SubTotal</th>
  21.    <th>&nbsp;</th>
  22.  </tr>";
  23.  
  24. $cantidad = count($carro);
  25.  
  26. for($x=0;$x<=$cantidad;$x++){
  27.     $SQL = "SELECT * FROM precios WHERE id = ".$carro[$x]['id'].";";
  28.     $registro= mysql_query($SQL,$mcon);
  29.     $f=mysql_fetch_assoc($registro);
  30.     $subtotal = $f['precio']*$carro[$x]['cantidad'];
  31.     if($f['id']){
  32.     $mensaje.="
  33.    <tr>
  34.        <td>$f['nombre']</td>
  35.        <td>$carro[$x]['cantidad']</td>
  36.        <td>$f['precio']</td>
  37.        <td>$subtotal</td>
  38.        <td>
  39.        </td>
  40.        </tr>";

prueba haciendo algo como eso, y lo mandas con tu funcion mail

Suerte.