Question: Task 1: Create a MySQL database called company_db with a table called employee_data. Create the following fields in the employee_data table using an appropriate datatype

Task 1:

Create a MySQL database called company_db with a table called employee_data.

Create the following fields in the employee_data table using an appropriate datatype to hold the data: employee_name, employee_address, age, language_spoken, is_married

Task 2:

Create a PHP script that will display a form that will accept user input for the employee name, address, age, language spoken and married/single. Language spoken should be a listbox containing choices English, Spanish, and French. The married/single input should be in the form of a checkbox or radio toggle.

Check if the age entered is a numeric value and is greater than or equal to 16. If not, display an error back to the user.

Upon the user pressing the submit button, the user input is stored into the database. Enter employee data for at least 10 people.

Task 3:

Create a PHP script that contains the following buttons: search by name, and search by language.

The search by name feature should allow the user to enter a name or part of a name and return the record(s) matching the query. A button to delete the record(s) should be displayed. If the delete button is pressed, all records displayed on the screen from the last search should be removed from the database.

The search by language feature should return all records that match the spoken language. A button to delete the record(s) should be displayed. If the delete button is pressed, all records displayed on the screen from the last search should be removed from the database.

Task 4:

Create a PHP script that will dump the contents of the employee table into CSV text file that has comma separated values for each record. Each new record should begin on a new line.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!