Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/02/2010, 10:48
kvera
 
Fecha de Ingreso: julio-2008
Mensajes: 39
Antigüedad: 15 años, 9 meses
Puntos: 0
Pregunta Ayuda urgente mostrar registros

hola a todos....tengo un codigo en el que quiero mostrar los datos de acuerdo a la selección realizada por el usuario y mi codigo es el siguiente:

Cita:
<?php
error_reporting(E_ERROR);
$ID_SES=$_POST['ID_SES'];
echo $ID_SES;
$state = false;
if ($_POST['action'] == "busc") {
$conexion = mysql_connect("localhost", "root", "");
mysql_select_db("agencia", $conexion);
$que = "SELECT * FROM SESIONES where ID_SESION=' " . $ID_SES . " '";
//$res = mysql_query($que, $conexion) or die(mysql_error());
//$state = true;
echo $que;

echo "<table border = '1'> \n";

echo "<tr> \n";

echo "<td><b>ID Sesión</b></td> \n";

echo "<td><b>Lugar Sesión</b></td> \n";

echo "</tr> \n";

while ($row = mysql_fetch_row($que)){

echo "<tr> \n";

echo "<td>$row[0]</td> \n";

echo "<td>$row[1]</td> \n";

echo "</tr> \n";

}

echo "</table> \n";
}
?>
<h1>Seleccione Sesión a Visualizar</h1>


<form id="buscar" name="buscar" method="post" action="">
ID SESION:
<?php
$link=mysql_connect("localhost","root","");
mysql_select_db("agencia",$link);
echo"<select name=ID_SES id=ID_SES>";

$sql="SELECT ID_SESION FROM SESIONES";
$result=mysql_query($sql);
$i=0;
while ($row=mysql_fetch_row($result))
{
echo "<option value=".$row[$i].">".$row[$i]."</option>\n";
}
echo "</select>";
?>
<input type="submit" name="Submit" value="Buscar Sesion" />
<input type="hidden" name="action" value="busc" />
</form>
<?php if ($state) { ?>

<?php } ?>
</body>
</html>
el problema es que no me esta mostrando nada....

si alguien me puede ayudar con el error se lo agradeceré muchisimo...

De antemano gracias!

Salud..os!

Carla