0% found this document useful (0 votes)
2 views1 page

PHP_Tasks_1

The document outlines two PHP tasks aimed at enhancing programming skills. Task 1 involves building a simple calculator that utilizes PHP variables, constants, and functions to perform basic arithmetic operations. Task 2 focuses on creating a login and registration system, including form handling, database connection, and user authentication with a MySQL database.

Uploaded by

manikanta115330
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)
2 views1 page

PHP_Tasks_1

The document outlines two PHP tasks aimed at enhancing programming skills. Task 1 involves building a simple calculator that utilizes PHP variables, constants, and functions to perform basic arithmetic operations. Task 2 focuses on creating a login and registration system, including form handling, database connection, and user authentication with a MySQL database.

Uploaded by

manikanta115330
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/ 1

PHP Tasks 1

Task 1: Build a Simple Calculator


Objective: Learn PHP variables, constants, and basic functions.

1. Create a form with fields to input two numbers and select an operation (Addition, Subtraction,

Multiplication, Division).

2. Use PHP to:

- Retrieve the inputs using $_POST.

- Define constants for mathematical operations (like PI or some constant values).

- Use functions to perform each operation.

3. Display the result below the form.

Task 2: Create a Login and Registration System


Objective: Learn form handling, database connection, and user authentication.

1. Create a MySQL database with a table `users` (fields: id, username, email, password).

2. Build a registration form:

- Validate input (e.g., ensure passwords match, email format is correct).

- Store the hashed password in the database.

3. Build a login form:

- Authenticate user credentials against the database.

- On success, display a "Welcome [username]" message.

You might also like