Results 1 to 6 of 6

Thread: creating a long list

  1. #1
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default creating a long list

    dunno if this can be done with pure HTML, i doubt it but this can be moved as neccesary, what im looking for is a way to dynamicaly create a list, that for example links to 400 mp3s or something crazy like that, i used a list generator then had to mess around with the code to get rid of the junk, but im changing the content of the list and don't wanna go through that again, what are my options???

  2. #2
    Join Date
    Oct 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You could do that with a php loop. Maybe have a loop that adds 1 to a variable every time. To do this you need to name the files like "file1.mp3", "file2.mp3", "file3.mp3", etc like this:

    for($i=1; $i<401; $i++) {
    echo '<a href="file' . $i . '.mp3">File ' . $i . '</a>';
    }


    But the problem with this is that the files would be named like "File 1" and "File 2" or "File One" and "File Two".

    Well, i'm no expert...

    NOTE: i don't think you can do that with HTML

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Can't do that in just html, unless you want to just type it out.

    You can do it with php (good idea), using the above method, or getting it from a database, or some variation... whatever.

    You could also do something similar with javascript, though php would be more compatible.

    PHP is always better than JS, if possible to use it. There are a few reasons. If you need it to be live, or can't use php, then JS is the answer.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thx, thought i would need somethin like php or asp, problem with me is i know how to do things in concept but in code when it comes to asp and php (still learnin) lol, i gotta look it all up, but what i was thinkin is if there was a way to scan a folder and produce a list. while we're on the subject, whats a good package for php, mysql etc. i just reinstalled windows on my server (was an unregistered copy of xp media center, now its xp pro), im using IIS 5.1

  5. #5
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    I think that you could do it with JavaScript though...
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  6. #6
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    nvm about creating the list i did it with a generator again, but the question remains, what should i get for PHP, Mysql, etc.?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •