viernes, 10 de junio de 2016

menu principal

table{
margin-top: 100px;
}
#menu{
height:200px;
text-align:center;
width: 1200px;
}
#menu a {
 display: inline-block;
 width: 200px;
}
#menu a img {
 height: 150px;
 width: 150px;
}
#menu a:hover img {
 height: 180px;
 width: 180px;
 -webkit-transition: all .3s ease-in-out;
 -moz-transition: all .3s ease-in-out;
 -o-transition: all .3s ease-in-out;
 -ms-transition: all .3s ease-in-out;
 transition: all .3s ease-in-out;
}

martes, 7 de junio de 2016

mostrar datos

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> tabla</title>
</head>
<body>
<center>
<center> <table border="1">
<thead>
<tr>
<th colspan="1"> <a href="index.html">nuevo</a></th><!--el href="index.html es para volver a
cargar el formulario principal por si deseo ingresar otro dato-->
<th colspan="5"> lista de alumnos</th>
</tr>
</thead>
<tbody><!--encabezado de una tabla-->
<tr>
<td> id </td> <!--variables que use en la base de datos-->
<td> nombre</td><!--variables que use en la base de datos-->
<td> grado </td><!--variables que use en la base de datos-->
<td> edad</td><!--variables que use en la base de datos-->

</tr>
<?php
include("conexion.php");
$query="SELECT * FROM alumnos ORDER BY 1";
$resultado=$conexion->query($query);
while($row=$resultado->fetch_assoc()){ //ciclo para llamar los datos//
?>
<tr>
<td><?php echo $row['id'];?></td> <!--son las variables que realice en la base de datos-->
<td><?php echo $row['nombre'];?></td><!--son las variables que realice en la base de datos-->
<td><?php echo $row['grado'];?></td><!--son las variables que realice en la base de datos-->
<td><?php echo $row['edad'];?></td><!--son las variables que realice en la base de datos-->

</tr>
<?php
}
?>
</tbody>
</table>
</center>
</body>
</html>