Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/12/2013, 20:36
facugu1998
 
Fecha de Ingreso: diciembre-2013
Mensajes: 21
Antigüedad: 10 años, 4 meses
Puntos: 0
Respuesta: Como hacer que si una fila de base de datos es igual a un valor que algo s

hola, intente hacer eso que me dijeron pero no me funciona, este es el codigo completo:

Código PHP:
Ver original
  1. <div id="información">
  2.         <h2>Colores disponibles </h2>
  3.         <?php
  4.         if ($color1 == "gris" );
  5.             echo(
  6.                 '<img src="imagenes/1.jpg" alt="" width="40px" height="40px" title=" '.$color1.'" style="margin-right:10px; margin-left:10px;"  />'
  7.            
  8.             );
  9.         if ($color1 == "azul" );
  10.             echo(
  11.                 '<img src="imagenes/2.jpg" alt="" width="40px" height="40px" title=" '.$color1.'" style="margin-right:10px; margin-left:10px;" />'
  12.            
  13.             );
  14.            
  15.         if ($color1 == "rojo" );
  16.             echo(
  17.                 '<img src="imagenes/3.jpg" alt="" width="40px" height="40px" title=" '.$color1.'" style="margin-right:10px; margin-left:10px;" />'
  18.            
  19.             );
  20.         if ($color1 == "amarillo" );
  21.             echo(
  22.                 '<img src="imagenes/4.jpg" alt="" width="40px" height="40px" title=" '.$color1.'" style="margin-right:10px; margin-left:10px;" />'
  23.            
  24.             );
  25.        
  26.    
  27.     ?>
  28.    
  29.     </div>