<?php

    
// Include the file that holds the database configuration
    
require('./config.php');

    
// Establish Database Connection
    
$db mysql_connect($host,$user,$pass); // Connect to the database server
    
mysql_select_db($database$db);     // Select the database we'll be using
    
    // echo the navigation
    
echo '<a href="index.php">home</a> | <a href="add.php">add data</a> | <a href="retr.php"><strong>retreive data</strong></a> | <a href="modify.php">modify data</a> | <a href="del.php">delete data</a>';
    
    
// echo default page
    
echo '<h2>Collected Data:</h2><hr/>';
    
$query mysql_query("SELECT id,data FROM data_table"); // Execute the query that receives the fields from the database
    
while ($data mysql_fetch_array($query)) { // Put all returning database fields in an array
        
echo '<b>id:</b> '.$data['id'].'<br/>'// echo the id (identification)
        
echo '<b>data:</b> '.$data['data'].'<hr/>'// echo the data
    
}
    
?>