URL point to the song and author

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bluelad
Forum Commoner
Posts: 34
Joined: Mon Jun 05, 2006 8:34 am

URL point to the song and author

Post by bluelad »

I was wondering if something like this can be done

song by author...........where songs and author autoamtically refer to the URL of that song. I am using song, author and the URL as separate fields in the table. So i would have to fetch 3 rows.....but how do i make the URL point to the song and author
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Magic.

Generally you add some logic that knows. What that entails for your specific application is, well darn hard to tell you if you don't give us details of how it's built.
bluelad
Forum Commoner
Posts: 34
Joined: Mon Jun 05, 2006 8:34 am

Post by bluelad »

If knew that magic i wouldnt have asked for it. :lol:
I am not good with english...so my words are well a bit "abrupt". What i want to is this.........
I give the name of the singer, name of the song and the URL where the song can be found......and the final output on my index page should be like this..... HIps dont lie by Shakira

Now i hope someone can perform the "magic"
jito
Forum Commoner
Posts: 85
Joined: Sat Mar 25, 2006 4:32 am
Location: india

Post by jito »

try that:

Code: Select all

//.............
//write the sql to fetch all data from ur table.
while($row=mysql_fetch_array($sql))
{
echo "<a href=".$row[url].">".$row['title']."by".$row['singer']."</a>";
//where url, title, and singer are the fields of your table.
}
//...............
bluelad
Forum Commoner
Posts: 34
Joined: Mon Jun 05, 2006 8:34 am

Post by bluelad »

thanks dude it worked.... :lol: :lol:
jito
Forum Commoner
Posts: 85
Joined: Sat Mar 25, 2006 4:32 am
Location: india

Post by jito »

thanks, anything else?
toasty2
Forum Contributor
Posts: 361
Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA

Post by toasty2 »

If you are serving songs in mp3 format with id3 tags, you could read those. For example, check out "Toast Radio" in my signature.

Oh, or you could use a database...
Post Reply