Gurugedara Educational Channel Supportive Materials
Information and Communication Technology
G.C.E. (A/L)
Lesson 6- PHP
Before, start the practicing examples including php codes, install xampp server in your
computer downloading from https://www.apachefriends.org/index.html.
Example PHP codes are given below. You can copy the content of php code one by one to the
Notepad editor. When you save the copied text provide php file names like PhpEx29.php. They
should save in the folder of c:\xampp\htdocs.
You can follow HTML supportive materials for saving .php file with notepad editor.
Example 01- PhpEx29.php
Example 02- PhpEx30.php
https://www.apachefriends.org/index.html
Example 03- PhpEx31.php
Example 04- PhpEx32.php
Example 05- PhpEx33.php
PHP Database Operations
Example 06- Ex01CreateDB.php
Create DB
Example 07- Ex02CreateTB.php
Create DB
Example 08- Ex03AddRec.php
Example 09- Ex04AddRec2.php
Example 10- Ex05AddRec3.php
Example 11- Ex06Display.php
Example 12- Ex07Display2.php
Example 13- Ex08Update.php
Above programs were written with Object Oriented Method. Same programs with Procedural
Method will discuss in the next lesson. The ICT paper of G.C.E. A/L examination 2019
includes an question with Object Oriented Method.
Example 14- Ex09Delete.php
My PHP Program to Delete Data