1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

jPlayer - Dynamic playlist from database

Discussion in 'jQuery' started by timelaw, Jul 17, 2013.

  1. #1
    Hello!

    So, I have a jPlayer and I need to generate a playlist automatically each time I upload a new song. Which means that it will generate once you go to the website.

    I have limited experience with JavaScript, so I am just warning you to be very detailed with me. I've been reading some books so I can understand the syntax at least (which to me looked like russian before I read) and I got the player it self to work, at least.

    Now all I need to do is this:
    Pull information from mysql containing all the songs I have uploaded to the server. It will seperate the songs in different multidimensonal arrays depending on the album.

    What one album (multi)array would look like:
    [Song1], [Song2], [Song3], ... , [Song10]
    title1, title2, title3, ..., title10
    artist1, artist2, artist3, ..., artist10
    lyrics1, lyrics2, lyrics3, ..., lyrics10

    Now, I know that with most albums, I don't to store the artist 10 times over because it is usually the same, and the lyrics fields are not really going to be used right now. That's for the future. But it was an example of how I was looking at it.

    On the other hand, I could make a normal array:
    [album]: artist, title1, title2, title3, title3, ..., title10

    That would suit just as fine now for what I'm going to do now (I have plans to make it more detailed later for other purposes)

    So my question is:

    How do I mix JavaScript with PHP to request this information once I open index.php on my website? The player is on the index and it is a tabbed website, and will not reload by refreshing.
     
    timelaw, Jul 17, 2013 IP
  2. HussainMHB

    HussainMHB Member

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #2
     
    HussainMHB, Oct 26, 2013 IP