Hi:
I am building a lyric page, but i encounter some problems
I am able to make the loop for all the artist name.
http://www.bt-zone.biz/bbmak/allartist.php
but I want to make a page that lists all artist names, and then when I click the artist name, a list of the song titles come up. I want to know how to I make that?
Here is my table structure
CREATE TABLE artists (
artist_id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
PRIMARY KEY(artist_id)
);
CREATE TABLE lyrics (
lyric_id INT NOT NULL AUTO_INCREMENT,
artist_id INT NOT NULL,
song_title VARCHAR(30) NOT NULL,
lyric TEXT NOT NULL,
PRIMARY KEY(lyric_id),
INDEX(artist_id)
);
here is the show.php code, i koow something wrong here, but i don't know where
I can not display the song_title for each artists in show.php
<?
$artist_id = $_GET['artist_id'];
$query = "select * From lyric where id = '$artist_id'";
$result = mysql_query("select song_title from lyric where id ='artist_id'");
while($r=mysql_fetch_array($result))
{
$song_title=$row["song_title"];
//display the row
echo "$song_title";
}
?>