Tuesday, March 23, 2010

Exercise 5 (Q5)

5. Use the PHP to work with MySQL database

Before go into part a to d. First to create the database “mydatabase” with the phpMyAdmin.

Step 1: Create the Database ‘mydatabase’ (5_5_1)


Step 2: Create Table ‘Employees’ (5_5_2)


Step 3: Create the Fields (5_5_3)


Step 4:Table Created (5_5_4)


Step 5: Input record (5_5_5)


Step 6: Record inserted (5_5_6)


Step 7: Display record (5_5_7)


a. Create a web page with the following PHP: (5_5_a)


Running result (5_5_a2)


b. Create “add_record.html” (5_5_b)


Running result (5_5_b2)


c. Create “add_record.php” (5_5_c)


Running result (5_5_c2)


d. codes to get multiple records (5_5_d)


Running result (5_5_d2)

No comments:

Post a Comment