[go: up one dir, main page]

0% found this document useful (0 votes)
33 views6 pages

WFS Lab Manual

The document is a lab manual for the Web Framework Service course at Vidhyadeep Institute, detailing various PHP and Python experiments. It includes exercises on PHP fundamentals, functions, database interaction, Python integration, and Flask web framework, each with specific aims, problem statements, algorithms, and expected outputs. The manual is structured into units covering topics such as arithmetic operations, form handling, file uploads, and session management.

Uploaded by

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

WFS Lab Manual

The document is a lab manual for the Web Framework Service course at Vidhyadeep Institute, detailing various PHP and Python experiments. It includes exercises on PHP fundamentals, functions, database interaction, Python integration, and Flask web framework, each with specific aims, problem statements, algorithms, and expected outputs. The manual is structured into units covering topics such as arithmetic operations, form handling, file uploads, and session management.

Uploaded by

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

Vidhyadeep Institute of Computer & Information

Technology

Problem Sheet (Lab Manual)

Courses: Web Framework Service (006551301) Class: SYMCA


Prepared By: Dr. Jaynesh Desai Academic Year: 2025-26
Vidhyadeep Institute of Computer & Information
Technology

Unit 1 – PHP Fundamentals

Experiment 1: Simple PHP Calculator


Aim: To develop a PHP web page that takes two numbers and performs basic arithmetic
operations.
Problem Statement: To develop a PHP web page that takes two numbers and performs
basic arithmetic operations.
Algorithm / Steps:
- Create an HTML form with inputs for numbers and operation selection.
- Use POST method to send data to PHP.
- Perform calculation using conditional statements.
- Display the result on the same page.
Expected Output: Output will vary based on user input and implementation.
Experiment 2: Array Sorting and Display
Aim: To create a PHP script that stores names in an array, sorts them, and displays the result.
Problem Statement: To create a PHP script that stores names in an array, sorts them, and
displays the result.
Algorithm / Steps:
- Create an array of student names.
- Use sort() function to arrange names in ascending order.
- Display sorted list using a loop.
Expected Output: Output will vary based on user input and implementation.
Experiment 3: Grade Evaluation
Aim: To write a PHP program to calculate total, percentage, and grade based on marks.
Problem Statement: To write a PHP program to calculate total, percentage, and grade based on
marks.
Algorithm / Steps:
- Accept marks for 5 subjects using an HTML form.
- Calculate total and percentage.
- Use conditional statements to assign a grade.
- Display the result.
Expected Output: Output will vary based on user input and implementation.
Experiment 4: Temperature Conversion

Aim: To develop a PHP script to convert temperature from Celsius to Fahrenheit and vice versa.
Problem Statement: To develop a PHP script to convert temperature from Celsius to
Fahrenheit and vice versa.
Algorithm / Steps:
- Create HTML form to accept temperature and unit.
- Use conditional statements to convert values.
- Display converted result.
Expected Output: Output will vary based on user input and implementation.
Vidhyadeep Institute of Computer & Information
Technology

Unit 2 – PHP Functions & Advanced Features

Experiment 1: Form Handling with Validation


Aim: To create a PHP registration form with validation for required fields, email format, and
password length. Problem Statement: To create a PHP registration form with validation for
required fields, email format, and password length.
Algorithm / Steps:
- Create an HTML form for Name, Email, Password.
- Use PHP to validate inputs.
- Display submitted data if valid, else show error messages.
Expected Output: Output will vary based on user input and implementation.
Experiment 2: File Upload and Download
Aim: To write a PHP script for uploading and downloading a file.
Problem Statement: To write a PHP script for uploading and downloading a file.
Algorithm / Steps:
- Create HTML form for file upload.
- Use move_uploaded_file() to save file.
- Provide a link to download the file.
Expected Output: Output will vary based on user input and implementation.
Experiment 3: Session-based Login System
Aim: To implement login using PHP sessions.
Problem Statement: To implement login using PHP sessions.
Algorithm / Steps:
- Create a login form.
- Verify user credentials.
- Store username in session and display welcome message.
- Implement logout to destroy session.
Expected Output: Output will vary based on user input and implementation.
Experiment 4: Send Email using PHP
Aim: To create a PHP script to send email using mail() function.
Problem Statement: To create a PHP script to send email using mail() function.
Algorithm / Steps:
- Create HTML form for email details (to, subject, message).
- Use PHP mail() function to send email.
- Display success or failure message.
Expected Output: Output will vary based on user input and implementation.
Vidhyadeep Institute of Computer & Information
Technology

Unit 3 – PHP Interaction with Database (MySQL)

Experiment 1: Student Management System


Aim: To create a PHP-MySQL app for inserting, updating, deleting, and viewing student records.
Problem Statement: To create a PHP-MySQL app for inserting, updating, deleting, and viewing
student records.
Algorithm / Steps:
- Create MySQL database and table.
- Design PHP forms for CRUD operations.
- Execute SQL queries and display results.
Expected Output: Output will vary based on user input and implementation.
Experiment 2: Product Search with AJAX
Aim: To develop an AJAX-based PHP search system.
Problem Statement: To develop an AJAX-based PHP search system.
Algorithm / Steps:
- Create MySQL table with product data.
- Create search box and use AJAX to fetch results.
- Display results without page reload.
Expected Output: Output will vary based on user input and implementation.
Experiment 3: Employee Records Viewer
Aim: To retrieve and display employee data from MySQL.
Problem Statement: To retrieve and display employee data from MySQL.
Algorithm / Steps:
- Connect PHP to MySQL.
- Fetch data using SELECT query.
- Display data in HTML table with sorting options.
Expected Output: Output will vary based on user input and implementation.
Experiment 4: Login Authentication using Database
Aim: To verify login credentials against MySQL database records.
Problem Statement: To verify login credentials against MySQL database records.
Algorithm / Steps:
- Create users table in MySQL.
- Create login form in PHP.
- Fetch and verify credentials from database.
- Redirect user to welcome page if valid.
Expected Output: Output will vary based on user input and implementation.
Vidhyadeep Institute of Computer & Information
Technology

Unit 4 – PHP–Python Integration

Experiment 1: Image Processing via Python from PHP


Aim: To upload an image using PHP and process it using Python.
Problem Statement: To upload an image using PHP and process it using Python.
Algorithm / Steps:
- Create PHP file upload form.
- Use shell_exec() to call Python script for grayscale conversion.
- Display processed image.
Expected Output: Output will vary based on user input and implementation.
Experiment 2: Data Analysis with Python Subprocess
Aim: To execute a Python script from PHP for processing CSV data.
Problem Statement: To execute a Python script from PHP for processing CSV data.
Algorithm / Steps:
- Upload CSV via PHP.
- Call Python script to process data.
- Display processed output in PHP page.
Expected Output: Output will vary based on user input and implementation.
Experiment 3: Directory Operations
Aim: To execute Python script from PHP for directory listing.
Problem Statement: To execute Python script from PHP for directory listing.
Algorithm / Steps:
- Write Python script using os module to list files.
- Call script from PHP using shell_exec().
- Display file list in PHP page.
Expected Output: Output will vary based on user input and implementation.
Experiment 4: Execute Python Math Script from PHP
Aim: To execute a Python script from PHP that performs mathematical calculations.
Problem Statement: To execute a Python script from PHP that performs mathematical
calculations.
Algorithm / Steps:
- Create HTML form to accept two numbers.
- Call Python script using shell_exec().
- Perform calculations in Python and return result to PHP.
- Display result in browser.
Expected Output: Output will vary based on user input and implementation.
Vidhyadeep Institute of Computer & Information
Technology

Unit 5 – Python Web Framework: Flask

Experiment 1: Basic Flask Webpage


Aim: To create a basic Flask app displaying a welcome message.
Problem Statement: To create a basic Flask app displaying a welcome message.
Algorithm / Steps:
- Install Flask and set up environment.
- Create app.py with Flask routes.
- Run and test app in browser.
Expected Output: Output will vary based on user input and implementation.
Experiment 2: Flask Form Handling
Aim: To handle HTML form data in Flask.
Problem Statement: To handle HTML form data in Flask.
Algorithm / Steps:
- Create HTML form template.
- Process form data using POST method in Flask.
- Display submitted data on a new route.
Expected Output: Output will vary based on user input and implementation.
Experiment 3: Flask File Upload with Session Tracking
Aim: To upload a file in Flask and track it using sessions.
Problem Statement: To upload a file in Flask and track it using sessions.
Algorithm / Steps:
- Create upload form in HTML.
- Save file in specific folder.
- Store filename in session and display it.
Expected Output: Output will vary based on user input and implementation.
Experiment 4: Flask Session Management
Aim: To create a Flask application that stores and retrieves session variables.
Problem Statement: To create a Flask application that stores and retrieves session variables.
Algorithm / Steps:
- Create Flask app with session configuration.
- Set session variables after form submission.
- Retrieve and display session data.
- Implement session clear functionality.
Expected Output: Output will vary based on user input and implementation.

You might also like