Este informe describe una práctica realizada sobre operadores lógicos en PHP. Los objetivos fueron aprender a utilizar operadores lógicos y variables en PHP, y mejorar la comprensión del lenguaje. Las actividades incluyeron ejercicios para ingresar datos usando formularios en PHP y mostrar resultados usando operadores lógicos como if/else. Los resultados incluyeron una mejor comprensión de PHP y el uso de XAMPP y operadores lógicos como switch case.
1. INFORME
Integrante: Lenin Mateo Quishpe Chanataxi
SEMESTRE: TERCERO
PARALELO: C
PRÁCTICA: #26
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
PHP1
<!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>Documento sin título</title>
</head>
<form action="ejercicio21.php" method="post">
Masculino <input type="radio" name="genero" value= masculino>
Femenino <input type="radio" name="genero" value= femenino> <br>
Tu edad <input type="text" name="edad" size="4">
<input type="submit" value="Entrar">
</form>
<body>
</body>
</html>
PHP2
<!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>
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. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<?php
$genero = $_POST["genero"];
$edad = $_POST["edad"];
if ($genero == 'masculino') {
echo "Es de genero masculino y ";
}else{
echo "Es de genero femenino y ";
}
if ($edad <18) {
echo "es menor de edad.";
}else{
echo "es mayor de edad.";
}
?>
<body>
</body>
</html>
CAPTURAS DEL PROGRAMA
PROGRAMA FUNCIONANDO CON EL NÚMERO DEL MES CORRECTO