<!DOCTYPE html>
<html>
<head>
<title>
</title>
<meta charset="utf-8">
</head>
<body>
<form action="guardar.php" method=POST><!aca es donde se hace la acción de guardar por lo tando debe realizar un archivo de guarda.php->
<table border=2 width=400 align=center>
<tr>
<td>nombre</td>
<td> <input type="text" required name="nombre" size=44px placeholder="ingrese el 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">
<a href="mostrar.php">MOSTRAR DATOS</a></td>
</tr>
<tr>
<td colspan=2 align="center">
<button type="submit" >GUARDAR</button>
</td>
</tr>
</table>
</form>
</body>
</html>
_________________________________________________________________________________
ARCHIVO GUARDAR.PHP
<?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";
}
?>
_____________________________________________________________________________
ARCHIVO MOSTRAR.PHP
<!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>
_______________________________________________________
archivo de conexion.php
<?
$conexion=new mysqli("localhost","root","123456","alumnoss");
?>
___________________________________________________________
CONSULTAR PHP
<!DOCTYPE html>
<html>
<head>
<title>guardar</title>
</head>
<body>
<center>
<?php
include("conexion.php");
$producto=$_POST['producto'];
$query="SELECT *FROM inventarios WHERE producto='$producto'";
$resultado=$conexion->query($query);
$row=$resultado->fetch_assoc();
?>
<CENTER><table border=2 width="200" align=center>
<tr>
<td>id</td>
<td> <input type="text" name="id" value="<?php echo $row['id'];?>"/> </td>
</tr>
<tr>
<td>producto</td>
<td> <input type="text" name="producto" value="<?php echo $row['producto'];?>"/> </td>
</tr>
<tr>
<td>categoria</td>
<td> <input type="text" name="categoria" value="<?php echo $row['categoria'];?>"/></td>
</tr>
<tr>
<td>fecha</td>
<td> <input type="date" name="fecha" value="<?php echo $row['fecha'];?>"/></td>
</tr>
<tr>
<td>cantidad</td>
<td> <input type="text" name="cantidad" value="<?php echo $row['cantidad'];?>"/></td>
</tr>
<tr>
<td colspan=2 align="center">
<a href="index.html">INICIO</a>
</td>
</tr>
</table>
</CENTER>
</BODY>
</HTML>
martes, 20 de septiembre de 2016
martes, 9 de agosto de 2016
martes, 2 de agosto de 2016
BASE DE DATOS CLIENTES
NUMERO DE ORDEN |
CLIENTE | TIENDA 1 | TIENDA 2 | TIENDA 3 | TIENDA 4 | TIENDA 5 |
| 1001 | Alcor Ltda. | Q 60,000.00 | Q 6,000.00 | Q 12,433.00 | Q16,941.00 | Q 52,000.00 |
| 1002 | Aldebarán S.A. | Q 54,435.00 | Q 42,821.00 | Q 6,955.00 | Q 4,659.00 | Q 50,000.00 |
| 1003 | Aldebarán S.A. | Q 5,717.00 | Q 4,828.00 | Q 500.00 | Q 389.00 | Q 25,000.00 |
| 1004 | Algol Ltda. | Q 82,930.00 | Q 9,521.00 | Q 50,186.00 | Q23,223.00 | Q100,000.00 |
| 1005 | Arturo S.A. | Q189,092.00 | Q114,632.00 | Q 42,473.00 | Q31,987.00 | Q200,000.00 |
| 1006 | Betelgeuse S.A. | Q 5,228.00 | Q 4,879.00 | Q 349.00 | Q - | Q 50,000.00 |
| 1007 | Cabra S.A. | Q 68,184.00 | Q 64,743.00 | Q 2,583.00 | Q 858.00 | Q100,000.00 |
| 1008 | Cabrillas SRL | Q188,652.00 | Q146,319.00 | Q 31,128.00 | Q11,205.00 | Q200,000.00 |
| 1009 | Canícula S.A. | Q147,266.00 | Q 59,764.00 | Q 54,240.00 | Q33,262.00 | Q200,000.00 |
| 1010 | Capela S.A. | Q173,951.00 | Q 56,847.00 | Q117,104.00 | Q - | Q200,000.00 |
| 1011 | Deneb Ltda. | Q 28,999.00 | Q 25,812.00 | Q 1,405.00 | Q 1,782.00 | Q 50,000.00 |
| 1012 | Denébola SRL | Q185,704.00 | Q143,332.00 | Q 25,077.00 | Q17,295.00 | Q200,000.00 |
| 1013 | Espiga Ltda. | Q 54,973.00 | Q 621.00 | Q 29,299.00 | Q25,053.00 | Q 50,000.00 |
| 1014 | Formalhaut S.A. | Q170,217.00 | Q100,853.00 | Q 21,304.00 | Q48,060.00 | Q200,000.00 |
| 1015 | Markab Ltda. | Q 21,274.00 | Q 17,057.00 | Q 2,363.00 | Q 1,854.00 | Q 25,000.00 |
| 1016 | Menkar Ltda. | Q145,770.00 | Q100,935.00 | Q 15,926.00 | Q28,909.00 | Q200,000.00 |
| 1017 | Mira Ceti S.A. | Q 86,577.00 | Q 12,703.00 | Q 31,188.00 | Q42,686.00 | Q 25,000.00 |
| 1018 | Mirak S.A. | Q147,615.00 | Q113,882.00 | Q 13,628.00 | Q20,105.00 | Q200,000.00 |
| 1019 | Mirfak S.A. | Q 49,561.00 | Q 10,557.00 | Q 31,404.00 | Q 7,600.00 | Q 50,000.00 |
| 1021 | Perla S.A. | Q 42,716.00 | Q 18,784.00 | Q 12,267.00 | Q11,665.00 | Q 50,000.00 |
| 1022 | Polar S.A. | Q207,082.00 | Q 62,824.00 | Q 49,854.00 | Q82,263.00 | Q200,000.00 |
| 1023 | Pollux Ltda. | Q 51,929.00 | Q 46,133.00 | Q 4,673.00 | Q 1,123.00 | Q100,000.00 |
| 1024 | Proción S.A. | Q 51,755.00 | Q 3,606.00 | Q 17,585.00 | Q30,564.00 | Q100,000.00 |
| 1025 | Régulo S.A. | Q191,434.00 | Q119,080.00 | Q 23,877.00 | Q48,477.00 | Q200,000.00 |
| 1027 | RR Lira Ltda. | Q 87,416.00 | Q 55,800.00 | Q 31,616.00 | Q - | Q100,000.00 |
| 1028 | Rukbah S.A. | Q 15,207.00 | Q 2,510.00 | Q 4,423.00 | Q 8,274.00 | Q 50,000.00 |
| 1029 | Scheat S.A. | Q113,138.00 | Q 79,852.00 | Q 20,083.00 | Q13,203.00 | Q200,000.00 |
| 1031 | Sirio S.A. | Q 85,366.00 | Q 28,018.00 | Q 37,069.00 | Q20,279.00 | Q100,000.00 |
| 1032 | Sirrah SRL | Q 62,422.00 | Q 31,165.00 | Q 9,764.00 | Q21,493.00 | Q100,000.00 |
| 1033 | Tolimán S.A. | Q 62,077.00 | Q 16,137.00 | Q 45,940.00 | Q - | Q100,000.00 |
| 1035 | Vega Ltda. | Q147,271.00 | Q 97,336.00 | Q 32,410.00 | Q17,525.00 | Q200,000.00 |
| 1063 | Schédir Ltda. | Q 44,304.00 | Q 6,235.00 | Q 19,603.00 | Q18,466.00 | Q 50,000.00 |
| 1086 | Rigel S.A. | Q 58,006.00 | Q 45,989.00 | Q 4,764.00 | Q 7,253.00 | Q100,000.00 |
| 1104 | Mizar S.A. | Q 14,881.00 | Q 11,448.00 | Q 1,108.00 | Q 2,325.00 | Q 25,000.00 |
| 1106 | Cástor S.A. | Q 45,567.00 | Q 26,749.00 | Q 6,321.00 | Q12,497.00 | Q 50,000.00 |
| 1109 | Trapecio SRL | Q146,178.00 | Q 68,804.00 | Q 28,973.00 | Q48,401.00 | Q100,000.00 |
viernes, 29 de julio de 2016
ACTUALIZACIÓN DE FORMULARIO
body{
background:#A9E2F3;
}
#menu{
text-align:center;
font-family:arial;
font-size:20px;
margin-top:12px;
}
#menu li{
display:inline-block;
padding:14px 14px;
background:#58ACFA;
}
#menu li a{
text-decoration:none;
color:#151515;
}
#menu li a:hover{
background:#8181F7;
}
#parrafo1{
background:#58ACFA;
width:48%;
height:50%;
float:left;
padding:12px 12px;
text-align:justify;
}
#parrafo2{
background:#58ACFA;
width:45%;
height:50%;
float:right;
padding:12px 12px;
text-align:justify;
}
form{
width:50%;
height:60%;
margin:0 auto;
border:1px solid blue;
padding:12px 12px;
}
label{
font-family:arial;
font-size:14px;
width:90%;
}
input{
display:block;
width:90%;
margin-bottom:12px;
}
textarea{
width:90%;
height:20%;
}
button{
background:blue;
cursor:pointer;
padding:12px 12px;
border-radius: 0.5em;
}
button:hover{
background:#81BEF7;
}
input:focus{
border:2px solid blue;
}
background:#A9E2F3;
}
#menu{
text-align:center;
font-family:arial;
font-size:20px;
margin-top:12px;
}
#menu li{
display:inline-block;
padding:14px 14px;
background:#58ACFA;
}
#menu li a{
text-decoration:none;
color:#151515;
}
#menu li a:hover{
background:#8181F7;
}
#parrafo1{
background:#58ACFA;
width:48%;
height:50%;
float:left;
padding:12px 12px;
text-align:justify;
}
#parrafo2{
background:#58ACFA;
width:45%;
height:50%;
float:right;
padding:12px 12px;
text-align:justify;
}
form{
width:50%;
height:60%;
margin:0 auto;
border:1px solid blue;
padding:12px 12px;
}
label{
font-family:arial;
font-size:14px;
width:90%;
}
input{
display:block;
width:90%;
margin-bottom:12px;
}
textarea{
width:90%;
height:20%;
}
button{
background:blue;
cursor:pointer;
padding:12px 12px;
border-radius: 0.5em;
}
button:hover{
background:#81BEF7;
}
input:focus{
border:2px solid blue;
}
miércoles, 27 de julio de 2016
estilos de contactos
label{
font-family:arial;
font-size:14px;
width:90%;
}
input{
display:block;
width:90%;
margin-bottom:12px;
}
textarea{
width:90%;
height:20%;
}
button{
background:blue;
cursor:pointer;
padding:12px 12px;
}
miércoles, 20 de julio de 2016
FORMULARIO CON INPUT Y LABELS
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css"
href="css/estilos.css">
<meta charset="utf-8">
</head>
<body>
<form action="guardar.php" method="post">
<label for="nombre">INGRESE SU NOMBRE</label>
<input type="text" name="nombre"
placeholder="ingrese su nombre"></input>
<label for="email">INGRESE SU CORREO</label>
<input type="email" name="correo"
placeholder="ingrese su correo"></input>
<label for="comentario">
ENCRIBA SU COMENTARIO</label>
<textarea type="text" name="comentario">
</textarea>
<button type="submit" value="comentario">
GUARDAR
</button>
</form>
</body>
</html>
<head>
<title></title>
<link rel="stylesheet" type="text/css"
href="css/estilos.css">
<meta charset="utf-8">
</head>
<body>
<form action="guardar.php" method="post">
<label for="nombre">INGRESE SU NOMBRE</label>
<input type="text" name="nombre"
placeholder="ingrese su nombre"></input>
<label for="email">INGRESE SU CORREO</label>
<input type="email" name="correo"
placeholder="ingrese su correo"></input>
<label for="comentario">
ENCRIBA SU COMENTARIO</label>
<textarea type="text" name="comentario">
</textarea>
<button type="submit" value="comentario">
GUARDAR
</button>
</form>
</body>
</html>
lunes, 2 de mayo de 2016
insertar datos a excel VBA
PRIMERO HACER EL USERFORM1
BOTON CALCULAR O OPERAR
Private Sub CommandButton1_Click()
TextBox6.Text = Val(TextBox4.Text) * Val(TextBox5.Text)
End Sub
____________________________________________________
EN EL BOTON DONDE QUEREMOS GUARDAR LOS DATOS EN UNA HOJA DE EXCEL
SON LA FILA 1 COLUMNA SEGÚN EL ORDEN
Private Sub CommandButton2_Click()
registro
Sheets("datos").Select
ult = Cells(Rows.Count, 1).End(xlUp).Row
Cells(ult + 1, 1) = TextBox1.Text
Cells(ult + 1, 2) = TextBox2.Text
Cells(ult + 1, 3) = TextBox3.Text
Cells(ult + 1, 4) = TextBox4.Text
Cells(ult + 1, 5) = TextBox5.Text
Cells(ult + 1, 6) = TextBox6.Text
End Sub
________________________________________________________________________________
ESTE CODIGO SEGÚN EL MODULO A UTILIZAR
Sub registro()
IDPRODUCTO = UserForm1.TextBox1.Text
CATEGORIA = UserForm1.TextBox2.Text
PRODUCTO = UserForm1.TextBox3.Text
CANTIDAD_INGRESADA = UserForm1.TextBox4.Text
PRECIO_UNIT = Val(UserForm1.TextBox5.Text)
Total = Val(UserForm1.TextBox6.Text)
End Sub
_____________________________________________________________________________
PARA SALIR DEL USERFORM
Private Sub CommandButton4_Click()
End
End Sub
_______________________________________________________________________________
PROPIEDAD PARA LLAMAR UN FORMULARIO DESDE EXCEL
UserForm1.Show
BOTON CALCULAR O OPERAR
Private Sub CommandButton1_Click()
TextBox6.Text = Val(TextBox4.Text) * Val(TextBox5.Text)
End Sub
____________________________________________________
EN EL BOTON DONDE QUEREMOS GUARDAR LOS DATOS EN UNA HOJA DE EXCEL
SON LA FILA 1 COLUMNA SEGÚN EL ORDEN
Private Sub CommandButton2_Click()
registro
Sheets("datos").Select
ult = Cells(Rows.Count, 1).End(xlUp).Row
Cells(ult + 1, 1) = TextBox1.Text
Cells(ult + 1, 2) = TextBox2.Text
Cells(ult + 1, 3) = TextBox3.Text
Cells(ult + 1, 4) = TextBox4.Text
Cells(ult + 1, 5) = TextBox5.Text
Cells(ult + 1, 6) = TextBox6.Text
End Sub
________________________________________________________________________________
ESTE CODIGO SEGÚN EL MODULO A UTILIZAR
Sub registro()
IDPRODUCTO = UserForm1.TextBox1.Text
CATEGORIA = UserForm1.TextBox2.Text
PRODUCTO = UserForm1.TextBox3.Text
CANTIDAD_INGRESADA = UserForm1.TextBox4.Text
PRECIO_UNIT = Val(UserForm1.TextBox5.Text)
Total = Val(UserForm1.TextBox6.Text)
End Sub
_____________________________________________________________________________
PARA SALIR DEL USERFORM
Private Sub CommandButton4_Click()
End
End Sub
_______________________________________________________________________________
PROPIEDAD PARA LLAMAR UN FORMULARIO DESDE EXCEL
UserForm1.Show
Suscribirse a:
Comentarios (Atom)