Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/09/2012, 10:01
marce_vampira
 
Fecha de Ingreso: junio-2012
Ubicación: En Chile :D
Mensajes: 44
Antigüedad: 11 años, 11 meses
Puntos: 0
mostrar datos en pop up desde un Select

Hola lindos, como estan?...

Tengo una duda, tengo el siguiente codigo:

Código PHP:
<?php require_once('Connections/localhost.php'); ?>
<?php
mysql_select_db
($database_localhost$localhost);
$query_Recordset1 "SELECT proy, noper FROM proyectos ORDER BY noper ASC";
$Recordset1 mysql_query($query_Recordset1$localhost) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
<script type="text/javascript">
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
</script>
</head>

<body>
<?php if($totalRows_Recordset1>0){ ?> 
<form method="get" name="form1"  id="form1" onsubmit="MM_openBrWindow('proyecto_elegido.php?nopers=<?php echo $row_Recordset1['noper']?>','d','width=800,height=600')">
  <select name="noper" id="noper">
    <option value="">Seleccione un Proyecto...</option>
    <option value="%">Todos</option>
    <?php
do {  
?>
    <option value="<?php echo $row_Recordset1['noper']?>"><?php echo $row_Recordset1['proy']?></option>
    <?php
} while ($row_Recordset1 mysql_fetch_assoc($Recordset1));
  
$rows mysql_num_rows($Recordset1);
  if(
$rows 0) {
      
mysql_data_seek($Recordset10);
      
$row_Recordset1 mysql_fetch_assoc($Recordset1);
  }
?>
  </select>
  <input type="submit" name="resultado" id="resultado" value="Enviar" />
</form>
<?php } else echo 'No se enconcraron registros'?>
</body>
</html>
<?php
mysql_free_result
($Recordset1);
?>
El cual muestra un pop up con una tabla con los datos "supuestamente" seleccionados....

Mi problema esta en que siempre el pop up me muestra el primer registro de 'noper'

Como puedo hacerlo???