Difference between revisions of "PHPEX04"

From mi-linux
Jump to navigationJump to search
Line 2: Line 2:
  
 
This week you have learnt to retrieve data from an existing database/table. But let's work with YOUR database:
 
This week you have learnt to retrieve data from an existing database/table. But let's work with YOUR database:
*[[MySQL|Register]] for a Mysql database if you haven't already done so.
+
#[[MySQL|Register]] for a Mysql database if you haven't already done so.
*Using the [[PhpMyAdmin|phpMyAdmin]] administration page, create a simple table (people, products, films, bands, etc.) For this example I have created a Films table:
+
#Using the [[PhpMyAdmin|phpMyAdmin]] administration page, create a simple table (people, products, films, bands, etc.) For this example I have created a Films table:
  
 
[[IMAGE:Mysql-table-example01.gif]]
 
[[IMAGE:Mysql-table-example01.gif]]
  
*Still using the [[PhpMyAdmin|phpMyAdmin]] administration page, insert some data in your table, for example:
+
#Still using the [[PhpMyAdmin|phpMyAdmin]] administration page, insert some data in your table, for example:
  
 
[[IMAGE:Mysql-table-example02.gif]]
 
[[IMAGE:Mysql-table-example02.gif]]
  
*Finally, create a single webpage that connects to your database, retreive the data from the table above, and displays it in an unordered list:
+
#Finally, create a single webpage that connects to your database, retreive the data from the table above, and displays it in an unordered list:
  
*Alien
+
**Alien
*Aliens
+
**Aliens
*Alien 3
+
**Alien 3
*Predator
+
**Predator
*Seven
+
**Seven
*Sin City
+
**Sin City

Revision as of 10:00, 18 July 2011

Main Page >> Web Application Development >> Workbook >> Mini-task 04

This week you have learnt to retrieve data from an existing database/table. But let's work with YOUR database:

  1. Register for a Mysql database if you haven't already done so.
  2. Using the phpMyAdmin administration page, create a simple table (people, products, films, bands, etc.) For this example I have created a Films table:

Mysql-table-example01.gif

  1. Still using the phpMyAdmin administration page, insert some data in your table, for example:

Mysql-table-example02.gif

  1. Finally, create a single webpage that connects to your database, retreive the data from the table above, and displays it in an unordered list:
    • Alien
    • Aliens
    • Alien 3
    • Predator
    • Seven
    • Sin City