Practical Test
Practical Test
1. Create a new schema named practical_test. 2. Create a new table named employee with the following fields: a. emp_id (INT, Auto increment) b. emp_name (VARCHAR 100) c. emp_ic (VARCHAR 20) d. emp_phone (VARCHAR 20) e. emp_address (VARCHAR 200) 3. Create a new table named employee_medical with the following fields: a. id (INT, Auto increment) b. emp_id (INT) c. medical_notes (TEXT)
PHP:
4. Create form to add new employee into database, fields included: a. Employee Name b. Employee IC c. Employee Phone d. Employee Address e. Medical Notes Hints: Use mysql_insert_id() to insert emp_id into employee_medical table 5. List all the employees from database in table with two action links to update employees information and delete employee from database. a. Note: Display emp_id, emp_name, emp_ic, emp_phone, emp_address from employee table, and medical_notes from employee_ medical table. b. Hints: Use JOIN method to join two tables and retrieve data.
Tips:
It would be better if you learn how to write these PHP codes, rather than just copy from the examples online and paste to your source files. You could learn more by writing the codes. Good luck!