<?php
session_start();
mysql_connect("localhost","user","pas");
mysql_select_db("db");
$result=mysql_query("select * from coches order by id_coche");
?>
<table align="center">
<tr>
<th> </th>
<th> </th>
<th> </th>
<th> </th>
<th>Uds. </th>
<th> </th>
<th> </th>
</tr>
<?php
$color=0;
//mostramos los registros
echo '<form>';
while ($row=mysql_fetch_array($result))
{
if ($color %2)
$tr="#FFFFFF";
else
$tr="#DCDCDC";
echo '<tr class= "listar" bgcolor='.$tr.'>';
echo "<td><img src='img/escaner/$cod.jpg'></td>";
echo "<form action=listar.php>";
echo '<td>'.$row["modelo"].'</td>';
echo '<td>'.$row["precio"].'</td>';
echo '<td>'.$row["descripcion"].'</td>';
echo '<td><input type="text" name="cantidad" size=5>';
echo '<TD><A HREF="listar.php?cod_portatil='.$row["id_coche"].'"> Comprar </A></TD>';
echo '<td><input type=submit value=comprar></td>';
echo '</form>';
$color++;
}
?>
</table>
<?php
echo $marca;
este es el codigo que estoy siguiendo
si esto no va aqui, perdonar mi novatez
un saludo y espero respuesta en breve, me urge terminarlo