SlideShare una empresa de Scribd logo
1 de 10
Descargar para leer sin conexión
INFORME
ESTUDIANTE: Chacaguasay Denisse SEMESTRE: Tercer
PARALELO: C PRÁCTICA: #14
TEMA:
Sentencias de control
OBJETIVO:
Conocer las sentencias de control del lenguaje de programación PHP mediante
ejercicio de aplicación.
RESULTADOS DE APRENDIZAJE
- Sentencia IF and ELSE
- Sentencia SWITCH
ACTIVIDADES:
I Realizar un formulario de ventas de llantas con las sentencia de control.
DESARROLLO DE CONTENIDOS
1. Código del 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>Inscripciones</title>
<link rel="stylesheet" href="style3.css">
<form action="enviar.php" method="post">
</head>
<body >
<center><h1>Formulario de Compra de llantas</h1></center>
<hr />
<center>
<div style=" border: ridge #0f0fef 8px;">
<p><h3>Nombres: </h3></p>
<input type="text" name="nom" value="">
<p><h3>Apellidos: </h3></p>
<input type="text" name="nom2" value="">
<h3>Ciudad: </h3><br>
<input type="radio" name="ciu" value="1"> Quito
<input type="radio" name="ciu" value="2"> Guayaquil
<input type="radio" name="ciu" value="3"> Cuenca
<input type="radio" name="ciu" value="4"> Ambato
</div>
<hr />
<center>
<div style=" border: ridge #33FF00 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" va
lue="">
</div></center>
</center>
</center>
</div>
<hr />
<center>
<div style=" border: ridge #FFFF00 8px;">
<p><h3>Idiomas: </h3></p><br>
<input type="checkbox" name="idi" value="1"> RIN 10 <br>
<input type="checkbox" name="idi" value="2"> RIN 11<br>
<input type="checkbox" name="idi" value="3"> RIN 12 <br>
<input type="checkbox" name="idi" value="4"> RIN 13 <br>
<input type="checkbox" name="idi" value="5"> RIN 14 <br>
<input type="checkbox" name="idi" value="6"> RIN 15 <br>
<h3>Horario de Estudio: </h3><br>
<select name="select">
<option> 80 </option>
<option> 100</option>
<option> 200</option>
</select></center>
</div><hr />
<center>
<div style=" border: ridge #00FFFF 8px;">
<h3>Comentario:</h3> <br/>
<textarea name="comentario" rows="5" cols="50">Comentario:Gracias po
r su compra </textarea>
</div>
<hr />
<input type="submit" name="Enviar" />
<input type="reset" name="Limpiar" />
</body>
</html>
2. Código del botón 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="style3.css">
<title>Inscrito</title>
</head>
<body >
<center><h1>Compra de llantas de autos </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 nombre completo es:</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>AMBATO";
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>Genéro:</p>Femenino";
break;
case 2: echo "<p>Género:</p>Masculino";
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>".br;
}
if(!empty($_POST['nute']))
{
$nt=$_POST['nute'];
echo "<p>Su numero es:</p>".$nt;
}
else
{
echo "<p>Debe ingresar N&uacute;meros en el casillero Numero Telefon
ico</P>";
}
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>RIN:</p>10";
}
elseif($idi==2)
{
echo "<p>RIN:<p>11";
}
elseif($idi==3)
{
echo "<p>RIN:<p>12";
}
elseif($idi==4)
{
echo "<p>RIN:<p>13";
}
elseif($idi==5)
{
echo "<p>RIN:<p>14";
}
elseif($idi==6)
{
echo "<p>RIN:<p>15";
}
}
else
{
echo" No selecciono un idioma";
}
?>
</div>
<div style=" border: ridge #FFFF00 8px;">
<?php
if (!empty ($_POST["select"])){
$exa=$_POST["select"];
if ($exa=="80"){
$msm="<p><img src='llantas2.jpg'> El precio es: 80$</img><p>";
print $msm."<br>";
}
elseif ($exa=="100"){
$msm="<p><img src='llantas2.jpg'> El precio es: 100$</img><p>";
print $msm."<br>";
}
elseif ($exa=="200"){
$msm="<p><img src='llantas2.jpg'> El precio es: 200$</img><p>";
print $msm."<br>";
}
}
else {
echo "<p>No seleccion un Horario</p>";
}
?>
</div>
</body>
</html>
3. Código del estilo en CSS
body {
background-image:url(imagen.jpg);
background-size:200vw 300vh;
background-attachment:fixed;
margin:0;
}
div {
width:600px;
margin:auto;
background: rgb(236, 220, 232);
padding:10px 20px;
box-sizing: border-box;
margin-top:20px;
border-radius:7px;
}
h1{
color:#ffffff;
}
}
h3{
color:#08288a;
}
h2{
color:#0b0b94;
}
p
{
font-size:24px;
color:#0c0c8a;
}
Ejecución del programa
Al presionar el botón enviar
BIBLIOGRAFÍA
Diego Lazaro. Estructuras de control en PHP, 2016. [On line]:
https://diego.com.es/estructuras-decontrol-en-php
f.) ______________________ f.) __________________
Denisse Chacaguasay MSc. Víctor Zapata
ESTUDIANTE DOCENTE

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

16
1616
16
 
Cheque
ChequeCheque
Cheque
 
PHP blog blogger blogspot
PHP blog blogger blogspotPHP blog blogger blogspot
PHP blog blogger blogspot
 
Phpgaby
PhpgabyPhpgaby
Phpgaby
 
Módulo de PHP
Módulo de PHPMódulo de PHP
Módulo de PHP
 
Php
PhpPhp
Php
 
10
1010
10
 
Jefferson cuenca practica_b#6
Jefferson cuenca practica_b#6Jefferson cuenca practica_b#6
Jefferson cuenca practica_b#6
 
Phpgaby
PhpgabyPhpgaby
Phpgaby
 
Lenguaje de programacion php
Lenguaje de programacion   phpLenguaje de programacion   php
Lenguaje de programacion php
 
Phpablo
PhpabloPhpablo
Phpablo
 
Programacion Avanzada I
Programacion Avanzada IProgramacion Avanzada I
Programacion Avanzada I
 
Programación de códigos en PHP
Programación de códigos en PHPProgramación de códigos en PHP
Programación de códigos en PHP
 
Tarea sesion3
Tarea sesion3Tarea sesion3
Tarea sesion3
 
Programaion de codigos PHP.
Programaion de codigos PHP.Programaion de codigos PHP.
Programaion de codigos PHP.
 
Php Lenguaje de Paginas Web
Php Lenguaje de Paginas Web Php Lenguaje de Paginas Web
Php Lenguaje de Paginas Web
 
Phpgaby
PhpgabyPhpgaby
Phpgaby
 
Práctica web de la sesión 3
Práctica web de la sesión 3Práctica web de la sesión 3
Práctica web de la sesión 3
 
Intro php
Intro phpIntro php
Intro php
 
Secion3
Secion3Secion3
Secion3
 

Similar a Ejercicio denisse chacaguasay 3_c

Similar a Ejercicio denisse chacaguasay 3_c (20)

Inf 14 (ventadellantas) rines
Inf 14 (ventadellantas)   rinesInf 14 (ventadellantas)   rines
Inf 14 (ventadellantas) rines
 
Jefferson cuenca practica_b#5
Jefferson cuenca practica_b#5Jefferson cuenca practica_b#5
Jefferson cuenca practica_b#5
 
15
1515
15
 
5
55
5
 
U55
U55U55
U55
 
In 28
In 28In 28
In 28
 
Php excel
Php excelPhp excel
Php excel
 
PhpLab05
PhpLab05PhpLab05
PhpLab05
 
Guia N5 Proyectos Web Consultas Php Y My Sql
Guia N5   Proyectos Web   Consultas Php Y My SqlGuia N5   Proyectos Web   Consultas Php Y My Sql
Guia N5 Proyectos Web Consultas Php Y My Sql
 
DESARROLLO-CON-PHP-pptx.pptx
DESARROLLO-CON-PHP-pptx.pptxDESARROLLO-CON-PHP-pptx.pptx
DESARROLLO-CON-PHP-pptx.pptx
 
Jacqueline nuñez pacco
Jacqueline nuñez paccoJacqueline nuñez pacco
Jacqueline nuñez pacco
 
Jacqueline nuñez pacco
Jacqueline nuñez paccoJacqueline nuñez pacco
Jacqueline nuñez pacco
 
Documentacion jhon elvis_quispe_gutierrez
Documentacion jhon elvis_quispe_gutierrezDocumentacion jhon elvis_quispe_gutierrez
Documentacion jhon elvis_quispe_gutierrez
 
Php
PhpPhp
Php
 
La api de salesforce
La api de salesforceLa api de salesforce
La api de salesforce
 
Programacion en php
Programacion en phpProgramacion en php
Programacion en php
 
3144
31443144
3144
 
Guia N3 Proyectos Web Php Css, Js
Guia N3   Proyectos Web   Php Css, JsGuia N3   Proyectos Web   Php Css, Js
Guia N3 Proyectos Web Php Css, Js
 
Informe proyecto final programación lenguaje php
Informe proyecto final programación lenguaje phpInforme proyecto final programación lenguaje php
Informe proyecto final programación lenguaje php
 
Informe proyecto final grupal
Informe proyecto final grupalInforme proyecto final grupal
Informe proyecto final grupal
 

Más de DenisseChacaguasay (20)

Operadores y expresiones
Operadores y expresionesOperadores y expresiones
Operadores y expresiones
 
Vectores
VectoresVectores
Vectores
 
Bucle foreach
Bucle foreachBucle foreach
Bucle foreach
 
Bucle for (1)
Bucle for (1)Bucle for (1)
Bucle for (1)
 
Bucle while
Bucle whileBucle while
Bucle while
 
Sentencias de decision (2)
Sentencias de decision (2)Sentencias de decision (2)
Sentencias de decision (2)
 
Ejercicios y operadores lógicos
Ejercicios y operadores lógicosEjercicios y operadores lógicos
Ejercicios y operadores lógicos
 
Sintaxis básica, variables y constantes
Sintaxis básica, variables y constantesSintaxis básica, variables y constantes
Sintaxis básica, variables y constantes
 
Img20210708 18023345
Img20210708 18023345Img20210708 18023345
Img20210708 18023345
 
Sintaxis básica, variables y constantes (3)
Sintaxis básica, variables y constantes (3)Sintaxis básica, variables y constantes (3)
Sintaxis básica, variables y constantes (3)
 
Configuración y aplicación de php
Configuración y aplicación de phpConfiguración y aplicación de php
Configuración y aplicación de php
 
I1 u2
I1 u2I1 u2
I1 u2
 
I2 u2
I2 u2I2 u2
I2 u2
 
Generalidades php
Generalidades phpGeneralidades php
Generalidades php
 
Css
CssCss
Css
 
I6 u1
I6 u1I6 u1
I6 u1
 
I5 u1
I5 u1I5 u1
I5 u1
 
I2 u1
I2 u1I2 u1
I2 u1
 
I1 u1
I1 u1I1 u1
I1 u1
 
I4 u1
I4 u1I4 u1
I4 u1
 

Último

RETO MES DE ABRIL .............................docx
RETO MES DE ABRIL .............................docxRETO MES DE ABRIL .............................docx
RETO MES DE ABRIL .............................docxAna Fernandez
 
Metabolismo 3: Anabolismo y Fotosíntesis 2024
Metabolismo 3: Anabolismo y Fotosíntesis 2024Metabolismo 3: Anabolismo y Fotosíntesis 2024
Metabolismo 3: Anabolismo y Fotosíntesis 2024IES Vicent Andres Estelles
 
Factores ecosistemas: interacciones, energia y dinamica
Factores ecosistemas: interacciones, energia y dinamicaFactores ecosistemas: interacciones, energia y dinamica
Factores ecosistemas: interacciones, energia y dinamicaFlor Idalia Espinoza Ortega
 
Lecciones 04 Esc. Sabática. Defendamos la verdad
Lecciones 04 Esc. Sabática. Defendamos la verdadLecciones 04 Esc. Sabática. Defendamos la verdad
Lecciones 04 Esc. Sabática. Defendamos la verdadAlejandrino Halire Ccahuana
 
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptxLINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptxdanalikcruz2000
 
DECÁGOLO DEL GENERAL ELOY ALFARO DELGADO
DECÁGOLO DEL GENERAL ELOY ALFARO DELGADODECÁGOLO DEL GENERAL ELOY ALFARO DELGADO
DECÁGOLO DEL GENERAL ELOY ALFARO DELGADOJosé Luis Palma
 
el CTE 6 DOCENTES 2 2023-2024abcdefghijoklmnñopqrstuvwxyz
el CTE 6 DOCENTES 2 2023-2024abcdefghijoklmnñopqrstuvwxyzel CTE 6 DOCENTES 2 2023-2024abcdefghijoklmnñopqrstuvwxyz
el CTE 6 DOCENTES 2 2023-2024abcdefghijoklmnñopqrstuvwxyzprofefilete
 
PPT GESTIÓN ESCOLAR 2024 Comités y Compromisos.pptx
PPT GESTIÓN ESCOLAR 2024 Comités y Compromisos.pptxPPT GESTIÓN ESCOLAR 2024 Comités y Compromisos.pptx
PPT GESTIÓN ESCOLAR 2024 Comités y Compromisos.pptxOscarEduardoSanchezC
 
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.pptDE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.pptELENA GALLARDO PAÚLS
 
plan-de-trabajo-colegiado en una institucion educativa
plan-de-trabajo-colegiado en una institucion educativaplan-de-trabajo-colegiado en una institucion educativa
plan-de-trabajo-colegiado en una institucion educativafiorelachuctaya2
 
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...fcastellanos3
 
codigos HTML para blogs y paginas web Karina
codigos HTML para blogs y paginas web Karinacodigos HTML para blogs y paginas web Karina
codigos HTML para blogs y paginas web Karinavergarakarina022
 
FICHA DE MONITOREO Y ACOMPAÑAMIENTO 2024 MINEDU
FICHA DE MONITOREO Y ACOMPAÑAMIENTO  2024 MINEDUFICHA DE MONITOREO Y ACOMPAÑAMIENTO  2024 MINEDU
FICHA DE MONITOREO Y ACOMPAÑAMIENTO 2024 MINEDUgustavorojas179704
 
SINTAXIS DE LA ORACIÓN SIMPLE 2023-2024.pptx
SINTAXIS DE LA ORACIÓN SIMPLE 2023-2024.pptxSINTAXIS DE LA ORACIÓN SIMPLE 2023-2024.pptx
SINTAXIS DE LA ORACIÓN SIMPLE 2023-2024.pptxlclcarmen
 
NARRACIONES SOBRE LA VIDA DEL GENERAL ELOY ALFARO
NARRACIONES SOBRE LA VIDA DEL GENERAL ELOY ALFARONARRACIONES SOBRE LA VIDA DEL GENERAL ELOY ALFARO
NARRACIONES SOBRE LA VIDA DEL GENERAL ELOY ALFAROJosé Luis Palma
 
Plan Año Escolar Año Escolar 2023-2024. MPPE
Plan Año Escolar Año Escolar 2023-2024. MPPEPlan Año Escolar Año Escolar 2023-2024. MPPE
Plan Año Escolar Año Escolar 2023-2024. MPPELaura Chacón
 
Heinsohn Privacidad y Ciberseguridad para el sector educativo
Heinsohn Privacidad y Ciberseguridad para el sector educativoHeinsohn Privacidad y Ciberseguridad para el sector educativo
Heinsohn Privacidad y Ciberseguridad para el sector educativoFundación YOD YOD
 

Último (20)

Earth Day Everyday 2024 54th anniversary
Earth Day Everyday 2024 54th anniversaryEarth Day Everyday 2024 54th anniversary
Earth Day Everyday 2024 54th anniversary
 
La Trampa De La Felicidad. Russ-Harris.pdf
La Trampa De La Felicidad. Russ-Harris.pdfLa Trampa De La Felicidad. Russ-Harris.pdf
La Trampa De La Felicidad. Russ-Harris.pdf
 
RETO MES DE ABRIL .............................docx
RETO MES DE ABRIL .............................docxRETO MES DE ABRIL .............................docx
RETO MES DE ABRIL .............................docx
 
Metabolismo 3: Anabolismo y Fotosíntesis 2024
Metabolismo 3: Anabolismo y Fotosíntesis 2024Metabolismo 3: Anabolismo y Fotosíntesis 2024
Metabolismo 3: Anabolismo y Fotosíntesis 2024
 
Factores ecosistemas: interacciones, energia y dinamica
Factores ecosistemas: interacciones, energia y dinamicaFactores ecosistemas: interacciones, energia y dinamica
Factores ecosistemas: interacciones, energia y dinamica
 
Lecciones 04 Esc. Sabática. Defendamos la verdad
Lecciones 04 Esc. Sabática. Defendamos la verdadLecciones 04 Esc. Sabática. Defendamos la verdad
Lecciones 04 Esc. Sabática. Defendamos la verdad
 
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptxLINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
LINEAMIENTOS INICIO DEL AÑO LECTIVO 2024-2025.pptx
 
DECÁGOLO DEL GENERAL ELOY ALFARO DELGADO
DECÁGOLO DEL GENERAL ELOY ALFARO DELGADODECÁGOLO DEL GENERAL ELOY ALFARO DELGADO
DECÁGOLO DEL GENERAL ELOY ALFARO DELGADO
 
el CTE 6 DOCENTES 2 2023-2024abcdefghijoklmnñopqrstuvwxyz
el CTE 6 DOCENTES 2 2023-2024abcdefghijoklmnñopqrstuvwxyzel CTE 6 DOCENTES 2 2023-2024abcdefghijoklmnñopqrstuvwxyz
el CTE 6 DOCENTES 2 2023-2024abcdefghijoklmnñopqrstuvwxyz
 
PPT GESTIÓN ESCOLAR 2024 Comités y Compromisos.pptx
PPT GESTIÓN ESCOLAR 2024 Comités y Compromisos.pptxPPT GESTIÓN ESCOLAR 2024 Comités y Compromisos.pptx
PPT GESTIÓN ESCOLAR 2024 Comités y Compromisos.pptx
 
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.pptDE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
 
Defendamos la verdad. La defensa es importante.
Defendamos la verdad. La defensa es importante.Defendamos la verdad. La defensa es importante.
Defendamos la verdad. La defensa es importante.
 
plan-de-trabajo-colegiado en una institucion educativa
plan-de-trabajo-colegiado en una institucion educativaplan-de-trabajo-colegiado en una institucion educativa
plan-de-trabajo-colegiado en una institucion educativa
 
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
 
codigos HTML para blogs y paginas web Karina
codigos HTML para blogs y paginas web Karinacodigos HTML para blogs y paginas web Karina
codigos HTML para blogs y paginas web Karina
 
FICHA DE MONITOREO Y ACOMPAÑAMIENTO 2024 MINEDU
FICHA DE MONITOREO Y ACOMPAÑAMIENTO  2024 MINEDUFICHA DE MONITOREO Y ACOMPAÑAMIENTO  2024 MINEDU
FICHA DE MONITOREO Y ACOMPAÑAMIENTO 2024 MINEDU
 
SINTAXIS DE LA ORACIÓN SIMPLE 2023-2024.pptx
SINTAXIS DE LA ORACIÓN SIMPLE 2023-2024.pptxSINTAXIS DE LA ORACIÓN SIMPLE 2023-2024.pptx
SINTAXIS DE LA ORACIÓN SIMPLE 2023-2024.pptx
 
NARRACIONES SOBRE LA VIDA DEL GENERAL ELOY ALFARO
NARRACIONES SOBRE LA VIDA DEL GENERAL ELOY ALFARONARRACIONES SOBRE LA VIDA DEL GENERAL ELOY ALFARO
NARRACIONES SOBRE LA VIDA DEL GENERAL ELOY ALFARO
 
Plan Año Escolar Año Escolar 2023-2024. MPPE
Plan Año Escolar Año Escolar 2023-2024. MPPEPlan Año Escolar Año Escolar 2023-2024. MPPE
Plan Año Escolar Año Escolar 2023-2024. MPPE
 
Heinsohn Privacidad y Ciberseguridad para el sector educativo
Heinsohn Privacidad y Ciberseguridad para el sector educativoHeinsohn Privacidad y Ciberseguridad para el sector educativo
Heinsohn Privacidad y Ciberseguridad para el sector educativo
 

Ejercicio denisse chacaguasay 3_c

  • 1. INFORME ESTUDIANTE: Chacaguasay Denisse SEMESTRE: Tercer PARALELO: C PRÁCTICA: #14 TEMA: Sentencias de control OBJETIVO: Conocer las sentencias de control del lenguaje de programación PHP mediante ejercicio de aplicación. RESULTADOS DE APRENDIZAJE - Sentencia IF and ELSE - Sentencia SWITCH ACTIVIDADES: I Realizar un formulario de ventas de llantas con las sentencia de control. DESARROLLO DE CONTENIDOS 1. Código del 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>Inscripciones</title> <link rel="stylesheet" href="style3.css"> <form action="enviar.php" method="post"> </head> <body > <center><h1>Formulario de Compra de llantas</h1></center> <hr /> <center> <div style=" border: ridge #0f0fef 8px;"> <p><h3>Nombres: </h3></p> <input type="text" name="nom" value=""> <p><h3>Apellidos: </h3></p> <input type="text" name="nom2" value=""> <h3>Ciudad: </h3><br> <input type="radio" name="ciu" value="1"> Quito <input type="radio" name="ciu" value="2"> Guayaquil <input type="radio" name="ciu" value="3"> Cuenca <input type="radio" name="ciu" value="4"> Ambato </div> <hr /> <center> <div style=" border: ridge #33FF00 8px;">
  • 2. <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" va lue=""> </div></center> </center> </center> </div> <hr /> <center> <div style=" border: ridge #FFFF00 8px;"> <p><h3>Idiomas: </h3></p><br> <input type="checkbox" name="idi" value="1"> RIN 10 <br> <input type="checkbox" name="idi" value="2"> RIN 11<br> <input type="checkbox" name="idi" value="3"> RIN 12 <br> <input type="checkbox" name="idi" value="4"> RIN 13 <br> <input type="checkbox" name="idi" value="5"> RIN 14 <br> <input type="checkbox" name="idi" value="6"> RIN 15 <br> <h3>Horario de Estudio: </h3><br> <select name="select"> <option> 80 </option> <option> 100</option> <option> 200</option> </select></center> </div><hr /> <center> <div style=" border: ridge #00FFFF 8px;"> <h3>Comentario:</h3> <br/> <textarea name="comentario" rows="5" cols="50">Comentario:Gracias po r su compra </textarea> </div> <hr /> <input type="submit" name="Enviar" /> <input type="reset" name="Limpiar" /> </body> </html> 2. Código del botón 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">
  • 3. <head> <meta http-equiv="Content-Type" content="text/html; charset=iso- 8859-1" /> <link rel="stylesheet" href="style3.css"> <title>Inscrito</title> </head> <body > <center><h1>Compra de llantas de autos </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 nombre completo es:</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>AMBATO"; break; } } else { echo "<p>No ha selecionado una ciudad</p>"; } ?> </div> </hr> <div style=" border: ridge #33FF00 8px;">
  • 4. <?php if (!empty ($_POST['gen'])) { $g=$_POST['gen']; switch ($g) { case 1: echo "<p>Genéro:</p>Femenino"; break; case 2: echo "<p>Género:</p>Masculino"; 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>".br; } if(!empty($_POST['nute'])) { $nt=$_POST['nute']; echo "<p>Su numero es:</p>".$nt; } else {
  • 5. echo "<p>Debe ingresar N&uacute;meros en el casillero Numero Telefon ico</P>"; } 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>RIN:</p>10"; } elseif($idi==2) { echo "<p>RIN:<p>11"; } elseif($idi==3) { echo "<p>RIN:<p>12"; } elseif($idi==4) { echo "<p>RIN:<p>13"; } elseif($idi==5) { echo "<p>RIN:<p>14"; } elseif($idi==6) { echo "<p>RIN:<p>15"; } } else { echo" No selecciono un idioma"; } ?>
  • 6. </div> <div style=" border: ridge #FFFF00 8px;"> <?php if (!empty ($_POST["select"])){ $exa=$_POST["select"]; if ($exa=="80"){ $msm="<p><img src='llantas2.jpg'> El precio es: 80$</img><p>"; print $msm."<br>"; } elseif ($exa=="100"){ $msm="<p><img src='llantas2.jpg'> El precio es: 100$</img><p>"; print $msm."<br>"; } elseif ($exa=="200"){ $msm="<p><img src='llantas2.jpg'> El precio es: 200$</img><p>"; print $msm."<br>"; } } else { echo "<p>No seleccion un Horario</p>"; } ?> </div> </body> </html> 3. Código del estilo en CSS body { background-image:url(imagen.jpg); background-size:200vw 300vh; background-attachment:fixed; margin:0; } div { width:600px; margin:auto; background: rgb(236, 220, 232); padding:10px 20px; box-sizing: border-box; margin-top:20px; border-radius:7px; } h1{ color:#ffffff; } } h3{ color:#08288a; } h2{
  • 8. Al presionar el botón enviar
  • 9.
  • 10. BIBLIOGRAFÍA Diego Lazaro. Estructuras de control en PHP, 2016. [On line]: https://diego.com.es/estructuras-decontrol-en-php f.) ______________________ f.) __________________ Denisse Chacaguasay MSc. Víctor Zapata ESTUDIANTE DOCENTE