El documento presenta un informe de una práctica sobre operadores lógicos en PHP. Los objetivos fueron utilizar operadores lógicos y variables en PHP, y aprender el nuevo lenguaje. Las actividades incluyeron ejercicios en PHP para ingresar datos y usar operadores lógicos como Switch Case. Los resultados fueron una mejor comprensión de PHP, aprender a usar el servidor XAMPP, y utilizar operadores lógicos.
Heinsohn Privacidad y Ciberseguridad para el sector educativo
13
1. INFORME
Integrante: Juan Pablo Simbaña
SEMESTRE: TERCERO
PARALELO: C
PRÁCTICA:#13
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">
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. <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>
<?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