SlideShare a Scribd company logo
1 of 3
1 | P a g e
Republic of the Philippines
DEPARTMENT OF EDUCATION
REGION VII- CENTRAL VISAYAS
LILOAN DISTRICT
LILOAN NATIONAL HIGH SCHOOL EXT-DON BOSCO
Web Programming Activity Sheet #1
Name: _________________________________ Date Performed: ________________ Rating: _____________
Introduction to PHP
Learning Objectives
Upon completion of this activity, you will be able to:
• Understand the fundamentals of PHP.
• Explain the proper syntax and operators of PHP.
• Understand the basic on variables and string functions of PHP
• Experiment on the “if else” statements.
• Experiment on the implementation of PHP on Apache server.
Background
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language.
PHP is now installed on more than 244 million websites and 2.1 million web servers. Originally created by Rasmus Lerdorf in 1995, the
reference implementation of PHP is now produced by The PHP Group. While PHP originally stood for Personal Home Page, it now stands
for PHP: Hypertext Preprocessor, a recursive acronym.
PHP code is interpreted by a web server with a PHP processor module, which generates the resulting web page: PHP commands
can be embedded directly into an HTML source document rather than calling an external file to process data. It has also evolved to include
a command-line interface capability and can be used in standalone graphical applications.
PHP is free software released under the PHP License, which is incompatible with the GNU General Public License (GPL) due to restrictions
on the usage of the term PHP. PHP can be deployed on most web servers and also as a standalone shell on almost every operating system
and platform, free of charge.
What are the three types of PHP file extension? __________________________
What type of scripting language does PHP belongs? __________________________
Scenario
This activity is to be performed on a computer that has Internet access and on which you can install the required web application to implement
data server based Web Server running on Apache with MySQL database and using PHP scripting. Estimated completion time, depending
on network speed, is 3 hours.
Task 1: Create a PHP file using notepad++ software and save the filename to “index.php”. Use the guide below for the content of
your php file. Remember, you may have to use updated web browser for better code functionality. Write down the name and specific version
of the web browser used? Browser Name ________________ Version: _______________
Figure 1. Web Content Display
Task 2: Write your PHP code that will display the Figure 1.
Refer to Figure 1, the screen should tell whether it is morning, afternoon or evening using the system time of your computer. Assign
three (3) variables for the name displayed that will correspond to your first name family name and Middle initial. Change the name with your
own name. The middle initial should be displayed using the string statement that will only display the first letter of it followed by a dot (.) Feel
free to change the color, size and font style of the content.
2 | P a g e
Write the PHP code below:
Task 3. Write down a brief explanation of your PHP code.
3 | P a g e
Task 4. Install WAMP server on your computer. Make sure to install the proper installer for 32bit or 64bit Operating system. Write
down the following details after installation.
WAMP Version: _____________ Apache Server Version: _____________
PHP Admin: ________________ MySQL Server Version: ______________
Write down the three WAMP color status and its meaning.
______________________________________________________________________
Task 5. Open C:WAMPWWW directory and replace the index.php with the one you created.
Task 6. Open http://localhost on your preferred web browser. Check if it will display the php file you’ve created.
Challenge:
1. Define PHP variables and write down the variables used in this activity.
2. Write down at least 3 types of PHP data types and define each.
3. How does php ECHO differs from PRINT?
4. Write down the specific STRING function being used in this activity.
Activity Observation and Summary:
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________
.

More Related Content

Similar to WEBProgLab1.docx (20)

Programming language
Programming languageProgramming language
Programming language
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
PHP LICTURES ..........
PHP LICTURES ..........PHP LICTURES ..........
PHP LICTURES ..........
 
Basic php
Basic phpBasic php
Basic php
 
chapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdfchapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdf
 
Php hypertext Preprocessor
Php hypertext PreprocessorPhp hypertext Preprocessor
Php hypertext Preprocessor
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Php unit i
Php unit iPhp unit i
Php unit i
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
PHP.docx
PHP.docxPHP.docx
PHP.docx
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
How PHP works
How PHP works How PHP works
How PHP works
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
IRJET- Mail Server Communication:PHP
IRJET-  	  Mail Server Communication:PHPIRJET-  	  Mail Server Communication:PHP
IRJET- Mail Server Communication:PHP
 
PHP
PHPPHP
PHP
 
Php
PhpPhp
Php
 
Wc13
Wc13Wc13
Wc13
 
Php&yii2
Php&yii2Php&yii2
Php&yii2
 
PHP
 PHP PHP
PHP
 

Recently uploaded

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

WEBProgLab1.docx

  • 1. 1 | P a g e Republic of the Philippines DEPARTMENT OF EDUCATION REGION VII- CENTRAL VISAYAS LILOAN DISTRICT LILOAN NATIONAL HIGH SCHOOL EXT-DON BOSCO Web Programming Activity Sheet #1 Name: _________________________________ Date Performed: ________________ Rating: _____________ Introduction to PHP Learning Objectives Upon completion of this activity, you will be able to: • Understand the fundamentals of PHP. • Explain the proper syntax and operators of PHP. • Understand the basic on variables and string functions of PHP • Experiment on the “if else” statements. • Experiment on the implementation of PHP on Apache server. Background PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP is now installed on more than 244 million websites and 2.1 million web servers. Originally created by Rasmus Lerdorf in 1995, the reference implementation of PHP is now produced by The PHP Group. While PHP originally stood for Personal Home Page, it now stands for PHP: Hypertext Preprocessor, a recursive acronym. PHP code is interpreted by a web server with a PHP processor module, which generates the resulting web page: PHP commands can be embedded directly into an HTML source document rather than calling an external file to process data. It has also evolved to include a command-line interface capability and can be used in standalone graphical applications. PHP is free software released under the PHP License, which is incompatible with the GNU General Public License (GPL) due to restrictions on the usage of the term PHP. PHP can be deployed on most web servers and also as a standalone shell on almost every operating system and platform, free of charge. What are the three types of PHP file extension? __________________________ What type of scripting language does PHP belongs? __________________________ Scenario This activity is to be performed on a computer that has Internet access and on which you can install the required web application to implement data server based Web Server running on Apache with MySQL database and using PHP scripting. Estimated completion time, depending on network speed, is 3 hours. Task 1: Create a PHP file using notepad++ software and save the filename to “index.php”. Use the guide below for the content of your php file. Remember, you may have to use updated web browser for better code functionality. Write down the name and specific version of the web browser used? Browser Name ________________ Version: _______________ Figure 1. Web Content Display Task 2: Write your PHP code that will display the Figure 1. Refer to Figure 1, the screen should tell whether it is morning, afternoon or evening using the system time of your computer. Assign three (3) variables for the name displayed that will correspond to your first name family name and Middle initial. Change the name with your own name. The middle initial should be displayed using the string statement that will only display the first letter of it followed by a dot (.) Feel free to change the color, size and font style of the content.
  • 2. 2 | P a g e Write the PHP code below: Task 3. Write down a brief explanation of your PHP code.
  • 3. 3 | P a g e Task 4. Install WAMP server on your computer. Make sure to install the proper installer for 32bit or 64bit Operating system. Write down the following details after installation. WAMP Version: _____________ Apache Server Version: _____________ PHP Admin: ________________ MySQL Server Version: ______________ Write down the three WAMP color status and its meaning. ______________________________________________________________________ Task 5. Open C:WAMPWWW directory and replace the index.php with the one you created. Task 6. Open http://localhost on your preferred web browser. Check if it will display the php file you’ve created. Challenge: 1. Define PHP variables and write down the variables used in this activity. 2. Write down at least 3 types of PHP data types and define each. 3. How does php ECHO differs from PRINT? 4. Write down the specific STRING function being used in this activity. Activity Observation and Summary: ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________ .