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;
}
viernes, 10 de junio de 2016
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>
<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>
jueves, 19 de mayo de 2016
PAGINA DOS
<html>
<head>
<title>pagina heber</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/estilos.css">
</head>
<body>
<table align="center" border="0" width="900" bgcolor="gray" class="table1">
<tr>
<td>
<img src="imagenes/encabezado.jpg" align="center">
</td>
</tr>
<tr>
<td>
<div id="menu">
<a href="mision.html" target="marco"><img src="imagenes/mision.png"></a>
<a href="vision.html" target="marco"><img src="imagenes/vision.png"></a>
<a href="contacto.html" target="marco"><img src="imagenes/contacto.png"></a>
</div>
</td>
</tr>
<tr>
<td>
<iframe name=marco width=100%
height=500 frameborder=0 src="mision.html">
</iframe>
</td>
</tr>
<tr>
<td>
pie de página: Autor Heber Rodriguez
</td>
</tr>
</table>
</body>
</html>
_________________________________________________________________________________
APLICANDO CSS
body {
background-color:#4682B4;
}
/* este es para darle color a toda el cuerpo de la pagina*/
.table1 {
margin-top: 100px;
box-shadow: 5px 5px 15px #000;
}
/* con esta opcion el margen de la tabla de arriba*/
#menu {
height: 100px;
text-align:center;
width: 900px;
}
/*desde aqui el menu le damos un alto un ancho y alineamos el texto al centro del menu*/
#menu a {
display: inline-block;
width: 150px;
}
/*esta opcion es para colocar el menu en linea y tener una separción de 150px por cada uno*/
#menu a img {
height: 75px;
width: 75px;
}
/* con esta opcion le estoy diciendo a la imagen del menu el tamaño y ancho que tendra*/
#menu a:hover img {
height: 100px;
width: 100px;
-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;
}
/* efecto al menu cuando pasamos el mouse*/
.titulo {
font-family: "Arial";
font-size: 40px;
text-align: center;
width: 100%;
}
.texto {
font-family: "Arial";
font-size: 20px;
line-height: 35px;
text-align: center;
}
.campo {
background: blue;
color: #FFF;
font-family: "Tahoma";
}
.campo:hover {
background: #f60;
box-shadow: 5px 5px 15px #000;
}
<head>
<title>pagina heber</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/estilos.css">
</head>
<body>
<table align="center" border="0" width="900" bgcolor="gray" class="table1">
<tr>
<td>
<img src="imagenes/encabezado.jpg" align="center">
</td>
</tr>
<tr>
<td>
<div id="menu">
<a href="mision.html" target="marco"><img src="imagenes/mision.png"></a>
<a href="vision.html" target="marco"><img src="imagenes/vision.png"></a>
<a href="contacto.html" target="marco"><img src="imagenes/contacto.png"></a>
</div>
</td>
</tr>
<tr>
<td>
<iframe name=marco width=100%
height=500 frameborder=0 src="mision.html">
</iframe>
</td>
</tr>
<tr>
<td>
pie de página: Autor Heber Rodriguez
</td>
</tr>
</table>
</body>
</html>
_________________________________________________________________________________
APLICANDO CSS
body {
background-color:#4682B4;
}
/* este es para darle color a toda el cuerpo de la pagina*/
.table1 {
margin-top: 100px;
box-shadow: 5px 5px 15px #000;
}
/* con esta opcion el margen de la tabla de arriba*/
#menu {
height: 100px;
text-align:center;
width: 900px;
}
/*desde aqui el menu le damos un alto un ancho y alineamos el texto al centro del menu*/
#menu a {
display: inline-block;
width: 150px;
}
/*esta opcion es para colocar el menu en linea y tener una separción de 150px por cada uno*/
#menu a img {
height: 75px;
width: 75px;
}
/* con esta opcion le estoy diciendo a la imagen del menu el tamaño y ancho que tendra*/
#menu a:hover img {
height: 100px;
width: 100px;
-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;
}
/* efecto al menu cuando pasamos el mouse*/
.titulo {
font-family: "Arial";
font-size: 40px;
text-align: center;
width: 100%;
}
.texto {
font-family: "Arial";
font-size: 20px;
line-height: 35px;
text-align: center;
}
.campo {
background: blue;
color: #FFF;
font-family: "Tahoma";
}
.campo:hover {
background: #f60;
box-shadow: 5px 5px 15px #000;
}
lunes, 9 de mayo de 2016
formulario sencillo
<!DOCTYPE html>
<html>
<head>
<title>
</title>
<meta charset="utf-8">
</head>
<body>
<form action="guardar.php" method=POST>
<table border=2 width=400 align=center>
<tr>
<td>nombre</td>
<td> <input type="text" required name="nombre" size=44px placeholder="ingresa tu primer nombre"> </td>
</tr>
<tr>
<td>grado</td>
<td> <input type="text" required name="grado" placeholder="ingrese el grado academico" > </td>
</tr>
<tr>
<td>edad</td>
<td> <input type="text" required name="edad" placeholder="ingrese la edad de la persona"></td>
</tr>
<tr>
<td colspan=2 align="center">
<button type="submit">GUARDAR</button>
</td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head>
<title>
</title>
<meta charset="utf-8">
</head>
<body>
<form action="guardar.php" method=POST>
<table border=2 width=400 align=center>
<tr>
<td>nombre</td>
<td> <input type="text" required name="nombre" size=44px placeholder="ingresa tu primer nombre"> </td>
</tr>
<tr>
<td>grado</td>
<td> <input type="text" required name="grado" placeholder="ingrese el grado academico" > </td>
</tr>
<tr>
<td>edad</td>
<td> <input type="text" required name="edad" placeholder="ingrese la edad de la persona"></td>
</tr>
<tr>
<td colspan=2 align="center">
<button type="submit">GUARDAR</button>
</td>
</tr>
</table>
</form>
</body>
</html>
viernes, 6 de mayo de 2016
insertar datos
<?php
include("conexion.php")
$nombre= $_POST['nombre'];
$grado= $_POST['grado'];
$edad= $_POST['edad'];
$query="INSERT INTO alumnos(nombre,grado,edad)VALUES('$nombre','$grado','$edad')";
$resultado= $conexion->query($query);
if($resultado){
echo "<script>alert('los datos fueron enviados exitosamente'); location.href='index.html'</script>";
}
else
{
echo"error al insertar dato";
}
?>
include("conexion.php")
$nombre= $_POST['nombre'];
$grado= $_POST['grado'];
$edad= $_POST['edad'];
$query="INSERT INTO alumnos(nombre,grado,edad)VALUES('$nombre','$grado','$edad')";
$resultado= $conexion->query($query);
if($resultado){
echo "<script>alert('los datos fueron enviados exitosamente'); location.href='index.html'</script>";
}
else
{
echo"error al insertar dato";
}
?>
miércoles, 20 de abril de 2016
OPTION SELECT
<html>
<head>
<title>formulario</title>
<meta charset="uft-8">
</head>
<body>
<form action="opciones.php" method="post">
<table border="2" width="400" align="center">
<tr>
<td colspan="2">
<center>
<img src="imagenes/icono.png" width="500" ></IMG>
</center>
</td>
</tr>
<tr>
<td>
INGRESE NOMBRE
</td>
<td>
<input type="text" name="nombre"></input>
</td>
</tr>
<tr>
<td>
SELECCIONE UNA CARRERA
</td>
<td>
<SELECT name="opcion">
<option value="baco">BACHILLERATO EN COMPUTACIÓN</OPTION>
<option value="merca">MERCADOTECNIA Y PUBLICIDAD</OPTION>
<option value="bad">BACHILLERATO EN DISEÑO GRAFICO</OPTION>
<option value="pcc">PERITO CONTADOR</OPTION>
<option value="pae">PERITO EN ADMINISTRACIÓN DE EMPRESAS</OPTION>
</SELECT>
</td>
</tr>
<TR>
<TD COLSPAN="2">
<button type="sumbit" value="INGRESAR">VER CARRERA</button>
</TD>
</TR>
</table>
</form>
</html>
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________-
<?
$nombre=$_POST['nombre'];
$opcion=$_POST['opcion'];
if($opcion=="pcc")
{
echo"<script>;location.href='peritos.html'</script>";
}
else if($opcion=="baco")
{
echo"<script>;location.href='baco.html'</script>";
}
else if($opcion=="merca")
{
echo"<script>;location.href='merca.html'</script>";
}
else if($opcion=="bad")
{
echo"<script>;location.href='bad.html'</script>";
}
else if($opcion=="pae")
{
echo"<script>;location.href='pae.html'</script>";
}
?>
<head>
<title>formulario</title>
<meta charset="uft-8">
</head>
<body>
<form action="opciones.php" method="post">
<table border="2" width="400" align="center">
<tr>
<td colspan="2">
<center>
<img src="imagenes/icono.png" width="500" ></IMG>
</center>
</td>
</tr>
<tr>
<td>
INGRESE NOMBRE
</td>
<td>
<input type="text" name="nombre"></input>
</td>
</tr>
<tr>
<td>
SELECCIONE UNA CARRERA
</td>
<td>
<SELECT name="opcion">
<option value="baco">BACHILLERATO EN COMPUTACIÓN</OPTION>
<option value="merca">MERCADOTECNIA Y PUBLICIDAD</OPTION>
<option value="bad">BACHILLERATO EN DISEÑO GRAFICO</OPTION>
<option value="pcc">PERITO CONTADOR</OPTION>
<option value="pae">PERITO EN ADMINISTRACIÓN DE EMPRESAS</OPTION>
</SELECT>
</td>
</tr>
<TR>
<TD COLSPAN="2">
<button type="sumbit" value="INGRESAR">VER CARRERA</button>
</TD>
</TR>
</table>
</form>
</html>
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________-
<?
$nombre=$_POST['nombre'];
$opcion=$_POST['opcion'];
if($opcion=="pcc")
{
echo"<script>;location.href='peritos.html'</script>";
}
else if($opcion=="baco")
{
echo"<script>;location.href='baco.html'</script>";
}
else if($opcion=="merca")
{
echo"<script>;location.href='merca.html'</script>";
}
else if($opcion=="bad")
{
echo"<script>;location.href='bad.html'</script>";
}
else if($opcion=="pae")
{
echo"<script>;location.href='pae.html'</script>";
}
?>
jueves, 7 de abril de 2016
case
$dia=4;
switch ($dia)
{
case 1:
echo "el dia es lunes";
break;
case 2:
echo "el dia es martes";
break;
case 3:
echo "el dia es miercoles";
break;
case 4:
echo "el dia es jueves";
break;
case 5:
echo "el dia es viernes";
break;
case 6:
echo "el dia es sabado";
break;
case 7:
echo "el dia es domingo";
break;
default:
echo "ese dia no existe";
}
?>
switch ($dia)
{
case 1:
echo "el dia es lunes";
break;
case 2:
echo "el dia es martes";
break;
case 3:
echo "el dia es miercoles";
break;
case 4:
echo "el dia es jueves";
break;
case 5:
echo "el dia es viernes";
break;
case 6:
echo "el dia es sabado";
break;
case 7:
echo "el dia es domingo";
break;
default:
echo "ese dia no existe";
}
?>
Suscribirse a:
Entradas (Atom)