INFORME BASE DE DATOS
Integrante: Jefferson Paúl Cuenca Tenecela
SEMESTRE: TERCERO
PARALELO: C
PRÁCTICA:#5
TEMA:
Operadores lógicos
OBJETIVO:
 Realizar la utilización de operadores lógicos y mejoramiento del uso del lenguaje de programación
“PHP”.
 Reconocer el uso de variables para el desarrollo del programa en “PHP”.
 Aprender a utilizar el nuevo lenguaje de programación de “PHP”.
RESULTADOS DE APRENDIZAJE
 La mejor comprensión del uso de lenguaje PHP
 Manipulación del servidor “XAMPP”
 Utilización de los operadores lógicos Switch Case
ACTIVIDADES:
- Realizar un ejercicio en php que permita ingresar
FORMULARIO
<!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=iso-8859-1" />
<title>RINES</title>
<link rel="stylesheet" href="style6.css">
<form action="enviar.php" method="post">
</head>
<body>
<center><h1>VENTA DE ACCESORIOS DE LLANTAS</h1></center>
<hr />
<center>
<div style=" border: ridge red 8px;">
<p><h3>Nombres Completos: </h3></p>
<input type="text" name="nom" value="">
<p><h3>Apellidos Completos: </h3></p>
<input type="text" name="nom2" value="">
<h3>Ciudad: </h3><br>
<input type="radio" name="ciu" value="1"> Quito
UNIVERSIDAD CENTRAL DEL ECUADOR
FACULTAD DE FILOSOFÍA, LETRAS Y CIENCIAS DE LA EDUCACIÓN
CARRERA DE LA PEDAGOGÍA DE LAS CIENCIAS EXPERIMENTALES
DE LA INFORMÁTICA
<input type="radio" name="ciu" value="2"> Guayaquil
<input type="radio" name="ciu" value="3"> Cuenca
<input type="radio" name="ciu" value="4"> Ambato
<input type="radio" name="ciu" value="4"> Ibarra
</div>
<hr />
<center>
<div style=" border: ridge yellow 8px;">
<p><h3>G&eacute;nero:</h3></p>
<input type="radio" name="gen" value="1" />Femenino
<input type="radio" name="gen" value="2" />Masculino
<p><h3>Edad: </h3></p><input type="text" name="edad" value="">
<p><h3>Correo electr&oacute;nico: </h3></p><input type="text" name="corre" value="">
<p><h3>N&uacute;mero Telef&oacute;nico: </h3></p><input type="text" name="nute" value="">
<p><h3>Direcci&oacute;n: </h3></p><input type="text" name="dire" value="">
</div></center>
</center>
</center>
</div>
<hr />
<center>
<div style=" border: ridge #FFFF 8px;">
<p><h3>Llantas: </h3></p><br>
<input type="checkbox" name="idi" value="1"> Rin 14 23 dolares <br>
<input type="checkbox" name="idi" value="2"> Rin 15 28 dolares <br>
<input type="checkbox" name="idi" value="3"> Rin 16 32 dolares<br>
<input type="checkbox" name="idi" value="4"> Rin 17 39 dolares<br>
<input type="checkbox" name="idi" value="5"> Rin 18 41 dolares<br>
<br>
</select></center>
</div><hr />
<center>
<div style=" border: ridge blue 8px;">
<h3><p>Su opini&oacute;n:</p></h3> <br/>
<textarea name="comentario" rows="5" cols="50">Comentario: </textarea>
</div>
<hr />
<input type="submit" name="Enviar" />
<input type="reset" name="Limpiar" />
</body>
</html>
ENVIAR
<!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=iso-8859-1" />
<link rel="stylesheet" href="style10.css">
<title>COMPRA HECHA</title>
</head>
<body>
<center><h1><center> VENTA DE ACCESORIOS DE LLANTAS </h1></center><br />
</h1></center><br />
<hr />
<div style=" border: ridge #0f0fef 8px;">
<?php
if(!empty($_POST['nom']))
{
$n=$_POST['nom'];
}
else {
echo "<p>Por favor Ingrese sus Nombres</p>";
}
if(!empty($_POST['nom2']))
{
$n1=$_POST['nom2'];
echo "<p>Su nombres y apellidos son:</p>".$n." ".$n1 ;
}
else {
echo "<p>Por favor Ingrese sus Apellidos</p>";
}
if(!empty($_POST['ciu']))
{
$c=$_POST['ciu'];
switch ($c)
{
case 1: echo "<p>Su ciudad es: </p> Quito";
break;
case 2: echo "<p>Su ciudad es: </p> Guayaquil";
break;
case 3: echo "<p>Su ciudad es: </p> Cuenca";
break;
case 4: echo "<p>Su ciudad es: </p> Ibarra";
break;
}
}
else {
echo "<p>No ha selecionado una ciudad</p>";
}
?>
</div>
</hr>
<div style=" border: ridge #33FF00 8px;">
<?php
if (!empty ($_POST['gen']))
{
$g=$_POST['gen'];
switch ($g)
{
case 1: echo "<p>Su genero es: </p> Femenino";
break;
case 2: echo "<p>Masculino</p>";
break;
}
}
else
{
echo "<p>No ha selecionado un G&eacute;nero</p>";
}
$e=$_POST['edad'];
if (!is_numeric($e))
{
echo "<p>Debe ingresar N&uacute;meros en el casillero edad</p>";
}
else
{
if ($e>=100 or $e<=0)
{
echo "Edad no permitida";
}
else
{
echo"<p>Su edad es:</p>".$e;
}
}
if (!empty($_POST['corre']))
{
$c2=$_POST['corre'];
echo "<p> Su correo es:</p>".$c2;
}
else
{
echo "<p>NO ha ingresado un correo electronico</p>";
}
$nt=$_POST['nute'];
if (!is_numeric($nt))
{
echo "<p>Debe ingresar N&uacute;meros en el casillero Numero Telefonico</P>";
}
else
{
echo "<p>Su numero es: </p>".$nt;
}
if (!empty($_POST['dire']))
{
$di=$_POST['dire'];
echo "<p> Su direccion es: </p>".$di;
}
else
{
echo "<p>Casillero Direccion vacio</p>";
}
?>
</div><hr />
<div style=" border: ridge #FFFF00 8px;">
<?php
if(!empty($_POST['idi']))
{
$idi=$_POST['idi'];
if ($idi==1)
{
echo "<p><img src='02.jpg'> </img><p> Rin 14=23 dolares ";
}
elseif($idi==2)
{
echo "<p><img src='02.jpg'> </img><p> Rin 15=25 dolares ";
}
elseif($idi==3)
{
echo "<p><img src='01.jpg'> </img><p> Rin 16=32 dolares";
}
elseif($idi==4)
{
echo "<p><p><img src='02.jpg'> </img><p> Rin 17=39 dolares";
}
elseif($idi==5)
{
echo "<p><p><img src='01.jpg'> </img><p> Rin 18=41 dolares";
}
}
else
{
echo" No selecciono ningún rin ";
}
?>
</html>
CAPTURAS DEL PROGRAMA
PROGRAMA FUNCIONANDO CON EL NÚMERO DEL MES CORRECTO
Jefferson cuenca practica_b#5
Jefferson cuenca practica_b#5

Jefferson cuenca practica_b#5

  • 1.
    INFORME BASE DEDATOS Integrante: Jefferson Paúl Cuenca Tenecela SEMESTRE: TERCERO PARALELO: C PRÁCTICA:#5 TEMA: Operadores lógicos OBJETIVO:  Realizar la utilización de operadores lógicos y mejoramiento del uso del lenguaje de programación “PHP”.  Reconocer el uso de variables para el desarrollo del programa en “PHP”.  Aprender a utilizar el nuevo lenguaje de programación de “PHP”. RESULTADOS DE APRENDIZAJE  La mejor comprensión del uso de lenguaje PHP  Manipulación del servidor “XAMPP”  Utilización de los operadores lógicos Switch Case ACTIVIDADES: - Realizar un ejercicio en php que permita ingresar FORMULARIO <!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=iso-8859-1" /> <title>RINES</title> <link rel="stylesheet" href="style6.css"> <form action="enviar.php" method="post"> </head> <body> <center><h1>VENTA DE ACCESORIOS DE LLANTAS</h1></center> <hr /> <center> <div style=" border: ridge red 8px;"> <p><h3>Nombres Completos: </h3></p> <input type="text" name="nom" value=""> <p><h3>Apellidos Completos: </h3></p> <input type="text" name="nom2" value=""> <h3>Ciudad: </h3><br> <input type="radio" name="ciu" value="1"> Quito UNIVERSIDAD CENTRAL DEL ECUADOR FACULTAD DE FILOSOFÍA, LETRAS Y CIENCIAS DE LA EDUCACIÓN CARRERA DE LA PEDAGOGÍA DE LAS CIENCIAS EXPERIMENTALES DE LA INFORMÁTICA
  • 2.
    <input type="radio" name="ciu"value="2"> Guayaquil <input type="radio" name="ciu" value="3"> Cuenca <input type="radio" name="ciu" value="4"> Ambato <input type="radio" name="ciu" value="4"> Ibarra </div> <hr /> <center> <div style=" border: ridge yellow 8px;"> <p><h3>G&eacute;nero:</h3></p> <input type="radio" name="gen" value="1" />Femenino <input type="radio" name="gen" value="2" />Masculino <p><h3>Edad: </h3></p><input type="text" name="edad" value=""> <p><h3>Correo electr&oacute;nico: </h3></p><input type="text" name="corre" value=""> <p><h3>N&uacute;mero Telef&oacute;nico: </h3></p><input type="text" name="nute" value=""> <p><h3>Direcci&oacute;n: </h3></p><input type="text" name="dire" value=""> </div></center> </center> </center> </div> <hr /> <center> <div style=" border: ridge #FFFF 8px;"> <p><h3>Llantas: </h3></p><br> <input type="checkbox" name="idi" value="1"> Rin 14 23 dolares <br> <input type="checkbox" name="idi" value="2"> Rin 15 28 dolares <br> <input type="checkbox" name="idi" value="3"> Rin 16 32 dolares<br> <input type="checkbox" name="idi" value="4"> Rin 17 39 dolares<br> <input type="checkbox" name="idi" value="5"> Rin 18 41 dolares<br> <br> </select></center> </div><hr /> <center> <div style=" border: ridge blue 8px;"> <h3><p>Su opini&oacute;n:</p></h3> <br/> <textarea name="comentario" rows="5" cols="50">Comentario: </textarea> </div> <hr /> <input type="submit" name="Enviar" /> <input type="reset" name="Limpiar" /> </body> </html> ENVIAR <!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=iso-8859-1" />
  • 3.
    <link rel="stylesheet" href="style10.css"> <title>COMPRAHECHA</title> </head> <body> <center><h1><center> VENTA DE ACCESORIOS DE LLANTAS </h1></center><br /> </h1></center><br /> <hr /> <div style=" border: ridge #0f0fef 8px;"> <?php if(!empty($_POST['nom'])) { $n=$_POST['nom']; } else { echo "<p>Por favor Ingrese sus Nombres</p>"; } if(!empty($_POST['nom2'])) { $n1=$_POST['nom2']; echo "<p>Su nombres y apellidos son:</p>".$n." ".$n1 ; } else { echo "<p>Por favor Ingrese sus Apellidos</p>"; } if(!empty($_POST['ciu'])) { $c=$_POST['ciu']; switch ($c) { case 1: echo "<p>Su ciudad es: </p> Quito"; break; case 2: echo "<p>Su ciudad es: </p> Guayaquil"; break; case 3: echo "<p>Su ciudad es: </p> Cuenca"; break; case 4: echo "<p>Su ciudad es: </p> Ibarra"; break; } } else { echo "<p>No ha selecionado una ciudad</p>"; } ?> </div> </hr> <div style=" border: ridge #33FF00 8px;"> <?php if (!empty ($_POST['gen'])) { $g=$_POST['gen'];
  • 4.
    switch ($g) { case 1:echo "<p>Su genero es: </p> Femenino"; break; case 2: echo "<p>Masculino</p>"; break; } } else { echo "<p>No ha selecionado un G&eacute;nero</p>"; } $e=$_POST['edad']; if (!is_numeric($e)) { echo "<p>Debe ingresar N&uacute;meros en el casillero edad</p>"; } else { if ($e>=100 or $e<=0) { echo "Edad no permitida"; } else { echo"<p>Su edad es:</p>".$e; } } if (!empty($_POST['corre'])) { $c2=$_POST['corre']; echo "<p> Su correo es:</p>".$c2; } else { echo "<p>NO ha ingresado un correo electronico</p>"; } $nt=$_POST['nute']; if (!is_numeric($nt)) { echo "<p>Debe ingresar N&uacute;meros en el casillero Numero Telefonico</P>"; } else { echo "<p>Su numero es: </p>".$nt; } if (!empty($_POST['dire'])) { $di=$_POST['dire']; echo "<p> Su direccion es: </p>".$di; } else
  • 5.
    { echo "<p>Casillero Direccionvacio</p>"; } ?> </div><hr /> <div style=" border: ridge #FFFF00 8px;"> <?php if(!empty($_POST['idi'])) { $idi=$_POST['idi']; if ($idi==1) { echo "<p><img src='02.jpg'> </img><p> Rin 14=23 dolares "; } elseif($idi==2) { echo "<p><img src='02.jpg'> </img><p> Rin 15=25 dolares "; } elseif($idi==3) { echo "<p><img src='01.jpg'> </img><p> Rin 16=32 dolares"; } elseif($idi==4) { echo "<p><p><img src='02.jpg'> </img><p> Rin 17=39 dolares"; } elseif($idi==5) { echo "<p><p><img src='01.jpg'> </img><p> Rin 18=41 dolares"; } } else { echo" No selecciono ningún rin "; } ?> </html> CAPTURAS DEL PROGRAMA PROGRAMA FUNCIONANDO CON EL NÚMERO DEL MES CORRECTO