0% found this document useful (0 votes)
301 views

PHP and Mysql Assignment Questions

Uploaded by

Joshua Reid
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)
301 views

PHP and Mysql Assignment Questions

Uploaded by

Joshua Reid
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/ 3

PHP AND MYSQL ASSIGNMENT QUESTIONS

1. What is the difference between the mysql_ and mysqli_ extensions in PHP, and which
one is recommended for use with MySQL databases?

2. Write a PHP script to connect to a MySQL database and display a success message if
the connection is established.

3. Create a simple HTML form and accept the user name and display the name through
PHP echo statement.

4. Create a PHP script that includes a form to register a new user (name, email, password,
confirm password). The form should validate that the password and confirm password
match, then insert the data into the users table.

5. Create a PHP script that includes a form to log in a user (email and password). The
form should submit the data to the same page, which will validate the user against the
users table in the database.

6. Create a PHP script that includes a form to update a user's profile information (name,
email) based on their user ID. The form should submit the data to the same page,
which will update the record in the users table.

7. Write a PHP script to delete a record from the users table with a specific ID.

8. Create a PHP script that allows users to search for records in a MySQL database. The
script should:
a. Retrieve user input from a search form.
b. Query the database to retrieve matching records.
c. Display the search results on a web page.

9. Create a PHP script that retrieves the student information from a MySQL database
and displays it in a table format similar to the one shown on the webpage. The
script should:
a. Connect to a MySQL database named "students" with a table named
"student_info" that has the following columns: "Name", "Roll No", "Locality",
and "Actions".
b. Retrieve all the student records from the "student_info" table.
c. Display the student information in a table format with columns for "Name",
"Roll No", and "Locality".
d. Include an "Actions" column with "Edit" and "Delete" links for each student
record.
10. Develop an Employee Management system , Implementing CRUD operations.

You might also like