0% found this document useful (0 votes)
6 views5 pages

PHP 1

This document is a lab work report on Web Technology II focusing on PHP, submitted by Abhishek Shrestha to Praveen Koirala at Trinity International SS & College. It includes objectives, theoretical background, a list of PHP programs completed, and a conclusion emphasizing the importance of PHP in web development. The report aims to provide students with a foundational understanding of PHP syntax, data types, operators, loops, arrays, and database interactions.

Uploaded by

mrsnowmanc8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

PHP 1

This document is a lab work report on Web Technology II focusing on PHP, submitted by Abhishek Shrestha to Praveen Koirala at Trinity International SS & College. It includes objectives, theoretical background, a list of PHP programs completed, and a conclusion emphasizing the importance of PHP in web development. The report aims to provide students with a foundational understanding of PHP syntax, data types, operators, loops, arrays, and database interactions.

Uploaded by

mrsnowmanc8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

TRINITY INTERNATIONAL SS & COLLEGE

Dillibazar Height, Kathmandu, Nepal

LAB WORK # [1]: Web Technology II: HyperText Pre-Processor(PHP)

(COMPUTER SCIENCE)

SUBMITTED BY: SUBMITTED TO:

NAME: Abhishek Shrestha

GRADE: XII (MB2)

DATE : 2081/10/18 Praveen Koirala

Faculty of Computer Science

KATHMANDU, NEPAL
2024
Table of Contents

S. No. Page No.

1. Acknowledgement I

2. Objectives II

3. Theoretical Background

3.1 Web Technology II

3.1.1 PHP

4. Work Done

4.1 Work Done on PHP

1. WAP to find sum of two numbers. Here, numbers are entered via html form.

2. Write a PHP program to swap two numbers.

3. Write a PHP program to input name and address using form and display them.

4. Write a PHP program to find the greatest number among three numbers. Here,
numbers are entered via html form.

5. Write a PHP program to input any number via form and check whether the number
is positive or negative and be sure number should not be zero.

6. Write a PHP program to display your name 100 times.

7. Write a PHP program to print a multiplication table of a number. Input the number
via form.

8. Write a PHP program to display the factorial value of a number.

9. WAP to print factors of a number.

10. Write a PHP program to store some strings in an array and print them.

11. Write a PHP program to sort data stored in an array. [Use sort() function and
print_r() to print.]

12. Write a PHP program to know whether two strings are the same or not.
13. Write a PHP program to input a string through a text box and find its length.[use
strlen()]

14. Write a PHP program to connect a database named ‘student’.

15. Write a PHP program to insert records in a database named student having table
student with field’s id, name and grade.

16. Write a PHP program to display all records (previous question) of students who
are in grade 11.

17. Write a PHP program to delete records of a student whose id is 3.[previous


question]

18. Write a PHP program to update a record of student whose id is 2. [Try same
program with name/grade.

5. Conclusion
CONCLUSION

In conclusion, PHP (Hypertext Preprocessor) is a powerful and widely-used server-side


scripting language, especially for web development. For Class 12 students,
understanding PHP provides a solid foundation for building dynamic websites and web
applications. It enables the creation of interactive pages by processing form data,
managing databases, and generating dynamic content. Key concepts such as variables,
operators, loops, functions, arrays, and object-oriented programming (OOP) form the
backbone of PHP development.

As you explore PHP, it’s essential to practice writing code and testing it to become
proficient. It’s also important to integrate PHP with databases like MySQL to create
dynamic, data-driven websites. PHP's versatility, ease of integration with HTML, and
vast community support make it a valuable tool for aspiring web developers.
Understanding these concepts can open doors to more advanced topics in web
development and programming.
OBJECTIVE
 To understand basic syntax of PHP
 To understand variable, data types and comment in PHP
 To understand Operators, conditional statements and iteration in PHP.
 To understand and apply the concept of loop/iteration in PHP.
 To understand the concept of array and its elements.
 To understand and apply some PHP built-in functions.
 To understand Form Processing.
 To accessing MySQL using PHP
 To perform CRUD Operation

You might also like