SA1 Variable Operators and Control Structures
SA1 Variable Operators and Control Structures
TECHNICAL-SUMMATIVE ASSESSMENT
1
PHP OUTPUT, VARIABLE FAMILIARIZATION, OPERATORS
AND CONTROL STRUCTURE
Name Role
Casin, Noel Josh B. Member
Members (if Group): Dela Cruz, Ryemdale Leader
Jimenez, Godwin Member
Palencia, Aster Member
Andor Carl Jose C. Member
TN26
Section:
Professor:
Mr. Andales
1. The student will create a student registration form using HTML and CSS with the
integration of PHP Scripts please refer to the attached image for the example.
a. All user entries from the student registration form will be converted in variables
b. In the output, they need to call for the declared variables and do some string
formats like name cases and numbers
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Registration Form</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div id="header">
<div class="hdr-logo"><img src="https://students.feutech.edu.ph/_public/img/header-logo.png"
width="31" height="42"></div>
<h1>FEU INSTITUTE OF TECHNOLOGY</h1>
<form id="registration-form">
<div class="user-details">
<div class="input-box">
<span class="details">Full Name</span>
document.getElementById('summary').innerHTML = summary;
}
</script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
.container {
max-width: 500px;
margin: 50px auto;
padding: 20px;
background-color: #e6f7ea; /* Soft green background */
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.title {
font-size: 24px;
font-weight: bold;
text-align: center;
margin-bottom: 20px;
color: #006400; /* Dark green text color */
}
.input-box {
margin-bottom: 15px;
flex: 1 1 250px;
}
.details {
font-weight: bold;
color: #006400; /* Dark green text color */
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus {
outline: none;
border-color: #4caf50; /* Lighter green on focus */
}
.button {
input[type="submit"] {
padding: 10px 20px;
background-color: #4caf50; /* Light green button background */
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #3e8e41; /* Darker green on hover */
}
.user-details {
display: flex;
flex-wrap: wrap;
gap: 20px;
.input-box {
margin-bottom: 15px;
flex: 0 0 48%; /* Adjusted width to accommodate gap */
}
/* Style for the registration summary */
#summary {
background-color: #e6f7ea; /* Soft green background */
color: #006400; /* Dark green text color */
padding: 20px;
margin-top: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
#summary h2 {
font-size: 24px;
font-weight: bold;
#summary p {
font-weight: bold;
margin-bottom: 10px;
}
#summary p:last-child {
margin-bottom: 0;
}
PHP OUTPUT:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<?php
echo "<style>
</style>";
echo "<table>";
echo "<tr>";
if ($i == 0 || $j == 0) {
$product = 0;
} else {
$product = $i * $j;
echo "</tr>";
echo "</table>";
?>
1. What is a variable?
- is a fundamental concept in computer programming. It's a symbolic name that represents a value
that can change or vary. Variables in programming are used to hold data that may be altered or
referenced inside a program.
- 1. Break
VIII. REFERENCES
1. https://www.w3schools.com/php/func_string_echo.asp
2. https://www.w3schools.com/css/
3. https://www.w3schools.com/html/
4. https://www.w3schools.com/php/php_variables.asp
5. https://www.w3resource.com/php/operators/arithmetic-operators.php
6. https://www.tutorialspoint.com/php/php_arithmatic_operators_examples.htm
7. https://www.w3schools.com/php/php_if_else.asp
8. https://www.w3schools.com/php/php_switch.asp
9. https://www.w3schools.com/php/php_looping.asp
10. https://www.w3schools.com/php/php_looping_while.asp
11. https://www.w3schools.com/php/php_looping_do_while.asp
12. https://www.w3schools.com/php/php_looping_for.asp
13. https://www.w3schools.com/php/php_looping_foreach.asp
14. https://www.w3schools.com/php/php_looping_break.asp