Viewing file: select_multiple_participantes.php (3.49 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!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=utf-8" />
<title>Documento sin título</title>
<script src="js/jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript">
function showgenero(str)
{
if (str=="")
{
document.getElementById("listado").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("listado").innerHTML=xmlhttp.responseText;
}
}
//xmlhttp.open("GET","getuser.php?q="+str,true);
xmlhttp.open("GET","?q="+str,true);
xmlhttp.send();
}
</script>
<center>
<table border="0">
<?php
$link=mysql_connect($server,$dbusername,$dbpassword);
$select=mysql_select_db($db_name) or die('No hay BD');
?>
<tr><td>
<?php
$cadena1="select * from participantes;";
$sql1=mysql_query($cadena1);
if($reg=mysql_fetch_array($sql1))
{
echo "<form name='abd' method='POST'>";
echo "Instancia a consultar"."<BR><BR>";
//echo "Nombre Instancia de participación: " . "<input type='text' name='instanpartA' id='instanpartA1' value='" . $instanpartA . "'> <BR><BR>";
echo "Nombre Instancia de participación: " . "<select multiple size='1' id='cbogenero2' name='organismo1'>";
//echo "<option value='X'>SELECCIONA</option>";
do
{
echo "<option value='".$reg['nombrepart']."'>".$reg['nombrepart']."</option>";
}while($reg=mysql_fetch_array($sql1));
echo "</select>";
//echo $j;
echo "<BR><BR><input type='submit' name='boton1' value='Consultar Instancia'>";
echo "<input type='hidden' name='abc' value='1'/>";
echo "</form>";
};
//echo "<form name='abc' method='POST'>";
//echo "Consultar Instancias"."<BR><BR>";
//echo "Digite nombre Instancia: " . "<input type='text' name='instanpartA' id='instanpartA1'> <BR>";
//echo "<BR><input type='submit' name='boton' value='Consultar Instancia'>";
//echo "<input type='hidden' name='abc' value='1'/>";
//echo "</form>";
if (isset($_POST['boton1']))
{
$instanpartA=$_POST["organismo1"];
}
$cadena="select * from participantes where nombrepart='$instanpartA'";
$sql=mysql_query($cadena);
if($reg=mysql_fetch_array($sql))
{
echo "<form name='abd' method='POST'>";
echo "Instancia consultada"."<BR><BR>";
echo "Nombre Instancia de participación: " . "<input type='text' name='instanpartA' id='instanpartA1' value='" . $instanpartA . "'> <BR><BR>";
echo "<select multiple size='10' id='cbogenero1' name='organismo[]'>";
echo "<option value='X'></option>";
do
{
$entidadespart = explode(",", $reg['entidadpart']);
$j=count($entidadespart);$j=$j-1;
for($i=0;$i<=$j;$i++) {
echo "<option value='".$entidadespart[$i].", "."'>".$entidadespart[$i].", "."</option>";
//echo "<option value='".$reg['entidadpart'].", "."'>".$reg['entidadpart'].", "."</option>";
}
}while($reg=mysql_fetch_array($sql));
echo "</select>";
//echo $j;
echo "<BR><BR><input type='hidden' name='boton' value='Seleccionar'>";
echo "<input type='hidden' name='abc' value='1'/>";
echo "</form>";
};
?>
</td></tr>
</table>
|