Ver Mensaje Individual
  #5 (permalink)  
Antiguo 13/10/2010, 13:50
troyer4
 
Fecha de Ingreso: septiembre-2010
Mensajes: 22
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Problemas con Array

Muchisimas gracias ditin por ayudarme solo q nose bien como aplicarlo a mi programacion jeje ya que asi como me lo mandas lo aplico y me aparcen 2 errores de variables no definidas $antiguo_camion y $subtotal,

Mira asi es como tengo yo el codigo completo

Código PHP:
Ver original
  1. <body>
  2. <h1><center>
  3.   Payment Report
  4. </center></h1>
  5. Martinez Frog's Inc.<br />
  6. 5815 Burr Oak Ave.<br />
  7. Berkeley, IL. 60163<P>
  8. Subcontractors<p>
  9.  
  10. <div id="invoice2">
  11.  <form>
  12.  <?php
  13.  $registros2=mysql_query("select invotemp.*, ite.* from invoicestemp invotemp,
  14. items ite where invotemp.driver='$_REQUEST[idtruck]' and invotemp.item=ite.item
  15. and invotemp.ccost=ite.ccost and invotemp.date>='$_REQUEST[fechaini]'
  16. and invotemp.date<='$_REQUEST[fechafin]' order by truck",$link);
  17.  
  18. ?>
  19.    <table width="100%" align="center">
  20.     <tr align="center">
  21.       <td width="8%"><div class="marco">Date</div></td>
  22.       <td width="12%"><div class="marco">Customer</div></td>    
  23.       <td width="5%"><div class="marco">Truck #</div></td>
  24.       <td width="6%"><div class="marco">Ticket #</div></td>
  25.       <td width="12%"><div class="marco">From</div></td>
  26.       <td width="12%"><div class="marco">To</div></td>
  27.       <td width="6%"><div class="marco">L/T/H</div></td>
  28.       <td width="6%"><div class="marco">Rate</div></td>
  29.       <td width="6%"><div class="marco">Amount</div></td>
  30.       <td width="6%"><div class="marco">Total</div></td>
  31.     </tr>
  32.      <?php
  33.      while ($fila=mysql_fetch_array($registros2))
  34.   {
  35.     ?>
  36.     <tr align="center">
  37.     <td><?php echo $fila['date'];?></td>  
  38.     <td><?php echo $fila['customer'];?></td>
  39.     <td><?php echo $fila['truck'];?></td>
  40.     <td><?php echo $fila['ticket'];?></td>
  41.     <td><?php echo $fila['fromitem'];?></td>
  42.     <td><?php echo $fila['toitem'];?></td>
  43.     <td><?php echo $fila['lth'];?></td>
  44.     <td><?php echo $fila['cbd'];?></td>
  45.     <td><?php $amount=$fila['lth']*$fila['cbd']; echo $amount;?> </td>
  46.     <td><?php $porcent=90; $porcent2=$porcent/100; $amount2=$amount*$porcent2; echo $amount2;?></td>
  47.     </tr>
  48.     <?php      
  49.     }
  50.     ?>
  51.    </table>
  52.  
  53. </form>
  54.  
  55. Return Home Page <a href="Home.php"><img src="home2.png" width="40" height="40" style="border:none" /></a>
  56. </div>
  57. </body>
  58. </html>

Qusiera poder mostrarte una caputara de pantalla del resultado q me da este codigo y otra de como lo necesito pero no se como poner las capturas aki

gracias y gracias por tu recomendaciones eres muy buen programador!!