All the practicals done in Web Programming sessions of FYIT Semester 2
All the practicals done in Web Programming sessions of FYIT Semester 2
This repository contains several PHP scripts and exercises covering fundamental web-programming topics such as conditionals, loops, arrays, and simple output formatting.
Examples include:
Odd-Even.php— determines if a number is odd or evenGreater Than.php— compares two valuesPalindrom.php— checks whether a string/number is a palindromePyramid.php,Pyramid 2.php— prints pyramid patterns using loops- …and more.
(See the file listing for the full set of scripts.)
- You need PHP installed (version 7.4+ is recommended)
- A local web-server environment such as XAMPP, MAMP, WampServer or built-in PHP server
- Optionally, a code editor like Visual Studio Code
git clone https://github.com/ThVariableYT/Web-Programming-Practicals.git
cd Web-Programming-Practicals-
Install and launch your environment (Apache + PHP).
-
To install wampserver, click here
-
Copy (or move) the cloned folder Web-Programming-Practicals/ into your web-server’s document root (e.g., www/ for WampServer).
-
If using WampServer64 on Windows: your folder might be "D:\wamp64\www\FYIT_4".
-
After setting up and installing wampserver64 (make sure you install wampserver64 on the root of your drive, for eg. C:/ or D:/), check if all the services are started and running.
-
If the services are running, click on the system tray icon and left click on the wampserver icon.
-
Click on the "localhost" option. A new browser window should open.
-
Scroll down and navigate to your folder which you created in the "www" folder.
-
Click on any file (e.g., Odd-Even.php) to see its output.
- Open a terminal inside the cloned repository folder.
Run:
php -S localhost:8080-
In your browser go to: http://localhost:8080
-
Then navigate to the desired script (e.g., http://localhost:8080/Palindrom.php).
-
Browse the folder structure in your editor.
-
Each PHP file is designed to be self-contained and runnable via a web-browser.
-
Open the script in your browser and interact if required (input prompts, form fields may apply).
-
Modify/extend the code to deepen your learning (change loop conditions, print styles, etc.).
Web-Programming-Practicals/
├── Odd-Even.php
├── Greater Than.php
├── Palindrom.php
├── Pyramid.php
├── Pyramid 2.php
├── .gitattributes
├── README.md
└── … other scripts …
-
Thanks for considering contributions!
-
Fork the repository on GitHub.
-
Create a feature branch:
git checkout -b feature-yourName- Make your changes and commit:
git commit -m "Add new exercise: factorial pattern"-
Push to your branch and open a Pull Request.
-
Ensure code is clear, commented, and functional.
- This project is licensed under the MIT License — see the LICENSE file for details.
Maintained by **ThVariableYT GitHub: https://github.com/ThVariableYT
Happy coding and enjoy exploring PHP web-programming practicals!
