<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
background-image: url(images/definitivogrande.png);
background-attachment:fixed;
background-repeat:no-repeat;
background-position:center;
}
</style>
<style>
.transpa {
background-color: transparent;
border: 1px solid #000000;
}
</style>
<body bgcolor="#FFCC66"><center><h1><font color=blue>Registro de asistencia</font></h1></center>
<center>
<form action="" method="post">
<table width="200" border="0">
<tr>
<td>Curso</td>
<td><?php $link=mysql_connect("localhost","root","");
mysql_select_db("pinochet",$link);
$Sql = "SELECT * FROM curso ";
$Resultado = mysql_query($Sql);
echo "<select class=transpa name='cmbcursoasistencia' id='cmbcursoasistencia'>";
while($Datos = mysql_fetch_array($Resultado))
{
echo "<option value='".$Datos[0]."'>".$Datos[1]."</option>";
}
echo "</select>";
?></td>
<td><input type="submit" name="confirma" id="confirma" value="Confirmar"></td>
</tr>
</table>
</form>
<form action="" method="post">
<?php
$curso=$_POST['cmbcursoasistencia'];
?>
</form>
<form action="" method="post">
<?php
$enlace = mysqli_connect('localhost', 'root', '', 'pinochet');
if (!$enlace) {
die('Error de Conexión (' . mysqli_connect_errno() . ') '
. mysqli_connect_error());
}
$result = mysqli_query($enlace, "SELECT nombre from alumno where id_curso='$curso'");
echo "</tr>";
while ($row = mysqli_fetch_array($result)){
echo "</tr>";
echo '<input name="chkest[]" type="checkbox" id="chkest[]" value="'.$row[1].'" checked />'.$row[0]."<br>" ;
}
mysqli_close($enlace);
?>
</form>
</center>
<br><br>
<center>
<form action="paginainspector.php" method="post">
<input type="submit" name="volver" id="volver" value="Volver">
</form>
</center>