Difference between revisions of "PHPEX04"

From mi-linux
Jump to navigationJump to search
Line 19: Line 19:
 
**Sin City
 
**Sin City
  
*Want to try something a little more difficult? Try displaying the film names and duration in a 2-column HTML table!
+
Make sure your page's HTML is compliant!
 +
 
 +
*Want to try something a little more difficult? Try displaying the film names and duration in a 2-column HTML table, as follow:
  
 
{| border="3" cellpadding=3 cellspacing=3
 
{| border="3" cellpadding=3 cellspacing=3
Line 33: Line 35:
 
|-
 
|-
 
|Sin City||100 mins
 
|Sin City||100 mins
|-
 
 
 
|}
 
|}
 +
 +
Again make sure your page's HTML is compliant!

Revision as of 11:10, 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:

  • Register for a Mysql database if you haven't already done so.
  • 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

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

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:
    • Alien
    • Aliens
    • Alien 3
    • Predator
    • Seven
    • Sin City

Make sure your page's HTML is compliant!

  • Want to try something a little more difficult? Try displaying the film names and duration in a 2-column HTML table, as follow:
Alien 110 mins
Aliens 130 mins
Alien 3 100 mins
Predator 100 mins
Seven 100 mins
Sin City 100 mins

Again make sure your page's HTML is compliant!