<?php
require_once ('mainfile.php');
include ('header.php');
$module_name = basename(dirname(__FILE__));
OpenTable();
$link = mysql_connect("localhost", "wi930422", "27fabukaRE");
mysql_select_db("wi930422_ppn",$link);
$result = mysql_query("SELECT id, artist FROM music", $link);
while($row = mysql_fetch_array($result)){
$id= $row['id'];
echo "<p><a href=\"modules.php?name=$module_name&d_op=Album\">". $row['artist']."</a></p>";
}
CloseTable();
function Album() {
include ('header.php');
$link = mysql_connect("localhost", "wi930422", "27fabukaRE");
mysql_select_db("wi930422_ppn",$link);
$result = mysql_query("SELECT * FROM music where id='$id'", $link);
while($row = mysql_fetch_array($result)){
OpenTable ();
echo "<p><a href='display4.php?id=", $row['id'], "'>", $row['album'], "</a></p>";
}
CloseTable();
}
include ('footer.php');
?>