This repository contains simple PHP programs developed for the Web Technology Laboratory practicals. Each program is written using basic HTML + PHP so that it can be easily executed in XAMPP/WAMP and is suitable for university practical examinations.
| Ex No | Program |
|---|---|
| 1 | Row and Column Sum |
| 2 | Sum of First N Prime Numbers |
| 3 | Email Validation |
| 4 | Words to Digits Conversion |
| 5 | Execution Delay |
| 6 | First Character Colour |
| 7 | Multiplication Table |
| 8 | Factorial of a Number |
| 9 | File Content Reversal |
| 10 | Rename .txt Files to .xtx |
| 11 | File List Sorted by Last Modification Time |
| 12 | Student Mark Sheet (Insert, Update, Delete using MySQL) |
| 13 | XML Email Extraction |
| 14 | XML DOM Retrieval |
| 15 | MySQL Table to XML using DOM |
- PHP 7.x or above
- XAMPP / WAMP / LAMP
- Web Browser
- MySQL (Exercises 12 & 15)
For Exercise 12 and Exercise 15, execute the SQL statements provided in sql.txt.
CREATE DATABASE college; USE college;
Then create the required student table and insert the sample records.
Used in Exercise 13 to retrieve email addresses.
Used in Exercise 14 to retrieve the value "John" using DOM methods.
Generated automatically by Exercise 15 after exporting MySQL data to XML.
- Install XAMPP or WAMP.
- Copy the project folder into the
htdocsdirectory. - Start Apache.
- Start MySQL (for Exercises 12 & 15).
- Open your browser and visit:
http://localhost/php_exercise/
Run any exercise:
http://localhost/php_exercise/ex1.php
or
http://localhost/php_exercise/ex7.php
- PHP Basics
- HTML Forms
- Loops & Arrays
- String Functions
- File Handling
- Email Validation
- XML Processing
- DOM Parser
- MySQL Connectivity
- Database CRUD Operations
Developed for Web Technology Laboratory practical exercises using HTML + PHP.