Ver Mensaje Individual
  #9 (permalink)  
Antiguo 01/06/2008, 16:48
Okiro
 
Fecha de Ingreso: mayo-2005
Mensajes: 51
Antigüedad: 19 años
Puntos: 0
Respuesta: Problema con lista desplegable

Fichero pedidos.php:
Código PHP:
<table width="900"  border="0" align="center" cellpadding="1" cellspacing="5" class="formBorder">
        <?php do { ?>
        <tr valign="top">
          <td width="16%"><img src="imagenes/peques/<?php echo $row_fotos['nombre']; ?>" name="nombre" width="162" height="121" id="nombre" /></td>
          <td width="84%"><table width="100%"  border="0" cellpadding="1" cellspacing="1">
            <tr>
              <td colspan="3"><span class="style14">Referencia <span class="style14 Estilo1"><?php echo $row_fotos['referencia']; ?></span></span></td>
              <td width="4%">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="3"><span class="style14">Lugar <span class="style14 Estilo1"><?php echo $row_fotos['lugar']; ?></span></span></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td width="32%"><span class="soluc Estilo1">Tama&ntilde;o<span class="style14 Estilo1">
                <?=$array[$tamano];    
                
?> 
                <select name="tamano" class="batch" id="tamano">
                  <option value="">Escoga Tama&ntilde;o</option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_tamano['tamano']?>"><?php echo $row_tamano['tamano']?></option>
                  <?php
} while ($row_tamano mysql_fetch_assoc($tamano));
  
$rows mysql_num_rows($tamano);
  if(
$rows 0) {
      
mysql_data_seek($tamano0);
      
$row_tamano mysql_fetch_assoc($tamano);
  }
?>
                </select>
              </span></span></td>
              <td width="32%"><span class="soluc Estilo1">Acabado <span class="style14 Estilo1">
                <select name="acabado" class="batch" id="acabado">
                  <option selected="selected" value="">Escoga Acabado</option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_acabado['acabado']?>"><?php echo $row_acabado['acabado']?></option>
                  <?php
} while ($row_acabado mysql_fetch_assoc($acabado));
  
$rows mysql_num_rows($acabado);
  if(
$rows 0) {
      
mysql_data_seek($acabado0);
      
$row_acabado mysql_fetch_assoc($acabado);
  }
?>
                                </select>
              </span><span class="style14 Estilo1"> </span></span></td>
              <td width="32%"><span class="soluc Estilo1">Tonalidad<span class="style14 Estilo1">
                <select name="especificacion" class="batch" id="especificacion">
                  <option selected="selected" value="">Escoga tonalidad</option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_especificaciones['especificacion']?>"><?php echo $row_especificaciones['especificacion']?></option>
                  <?php
} while ($row_especificaciones mysql_fetch_assoc($especificaciones));
  
$rows mysql_num_rows($especificaciones);
  if(
$rows 0) {
      
mysql_data_seek($especificaciones0);
      
$row_especificaciones mysql_fetch_assoc($especificaciones);
  }
?>
                                </select>
              </span></span></td>
              <td>&nbsp;</td>
            </tr>
          </table>            <br />            <table width="97%"  border="0" cellspacing="1" cellpadding="1">
              <tr align="left" valign="top">
                <td width="100%">
                  <form name="formupedidos" id="formupedidos" method="post" action="carro-compra.php">
                    <table width="100%"  border="0" cellspacing="1" cellpadding="1">
                      <tr>
                        <td><p class="style14">Enviar a mi carrito de compra </p></td>
                      </tr>
                      <tr>
                        <td><input name="imageField" type="image" src="imagenes/icono_carrito.gif" width="36" height="19" border="0" />
                          <input name="referencia" type="hidden" id="referencia" value="<?php echo $row_fotos['referencia']; ?>" />
                        <input name="acabado" type="hidden" id="acabado" value="<?php echo $row_acabado['acabado']; ?>" />
                        <input name="tamano" type="hidden" id="tamano" value="<?php echo $row_tamano['tamano']; ?>" />
                        <input name="especificacion" type="hidden" id="tonalidad2" value="<?php echo $row_especificaciones['especificacion']; ?>" />                        
                        <input name="hiddenField5" type="hidden" value="1" />
                        <input name="nombre" type="hidden" id="nombre" value="<?php echo $row_fotos['nombre']; ?>" /></td>
                      </tr>
                    </table>
                  </form>                  </td>
              </tr>
                      </table></td>
        </tr>
        <?php } while ($row_fotos mysql_fetch_assoc($fotos)); ?>
      </table>
      <br />
    <!-- InstanceEndEditable --></td>
  </tr>
</table>
</body><!-- InstanceEnd --></html>
<?php
mysql_free_result
($fotos);

mysql_free_result($tamano);

mysql_free_result($acabado);

mysql_free_result($especificaciones);
?>
fichero carrito compra:
Código PHP:
<?php 
if(isset($_POST['referencia']));{
$referencia=$_POST['referencia'];
$nombre=$_POST['nombre'];
$acabado=$_POST['acabado'];
$tamano=$_POST['tamano'];
$especificacion=$_POST['especificacion'];
$cantidad=$_POST['cantidad'];
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/carrito.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Documento sin t&iacute;tulo</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="file:///C|/AppServ/www/OLIVA/css/estilos.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-color: #000000;
}
-->
</style>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><img src="imagenes/titul-principal.jpg" width="148" height="82" /></div></td>
  </tr>
  <tr>
    <td><!-- InstanceBeginEditable name="edicion" -->
      <table width="96%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
        <tr align="left" valign="top" class="barra">
          <td width="11%">Foto</td>
          <td width="18%">referencia</td>
          <td width="14%">tama&ntilde;o</td>
          <td width="13%">acabado</td>
          <td width="18%">especificaciones</td>
          <td colspan="2">precio</td>
          <td width="10%">n&ordm; copias </td>
          <td width="4%">total</td>
        </tr>
        <tr align="left" valign="top" class="titulo">
          <td><img src="imagenes/peques/<?php print $nombre?>" name="imagen" width="70" height="51" id="imagen" /></td>
          <td>
          
          <?php    if($_POST["color"])
    {
        echo 
"Has elegido la opcion: ".$_POST["color"];
    }
    else
    {
        echo 
"No has elegido ninguna opcion.";
    }        
?>

          
          
          <?php print $referencia?></td>
          <td><?php echo .$_POST["color"]; ?></td>
          <td><?php print $acabado?></td>
          <td><?php print $especificacion?></td>
          <td colspan="2">&nbsp;</td>
          <td align="center">&nbsp;</td>
          <td align="right">&nbsp;</td>
        </tr>
        <tr align="left" valign="top" class="titulo">
          <td colspan="5">&nbsp;</td>
          <td width="7%">Forma de envio </td>
          <td width="5%">&nbsp;</td>
          <td>total</td>
          <td align="right">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="9">&nbsp;</td>
        </tr>
      </table>
    <!-- InstanceEndEditable --></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>