Top 100

Discussion in 'Web Design and Development' started by Mal, Sep 5, 2006.

  1. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #1
    Ok, here's an interesting problem. I have a friend who'd like me to set up a simple page where people can enter up to 10 of their favorite movies, games, etc (just one type, but obviously it could be adapted to any of those) and have it sort the results by which movies got the most votes. I haven't decided yet to use a preferential sort (weight the #1 votes more than the #10) or just use a straight "most times mentioned" system, but I think the former would be better. Anyone have a good suggestion? I have access to MySQL databases, which I figure could certainly be used, but I dunno if that'd be overkill or not. JavaScript doesn't seem to be nearly powerful enough.

    Thanks!

    jW
     
  2. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #2
    Thats a lot more work then you may realize. MySql is not overkill, it will do the job perfectly, but if you have to ask that, it lends me to believe you may not be familiar with it, then it's going to be a difficult task.
     
  3. Mal thread starter macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #3
    Yeah, I know it'll be a lot of work, at least that way. I've done a bit with MySQL, messing with the databases for phpBB, but never one from scratch. I think I could pull it off alright if I had a bit of a tutorial, though, I'm good at learning that kind of stuff. I've just never taken the time. I guessing writing the page/script in php would be the way to go for that, too. That I think I could handle just fine, I've messed with phpbb plenty to learn the basics of php. Is there another way around this though? A script I can download from somewhere? If there was a quicker, easier way to do it, I think I'd be interested.

    jW
     
  4. Mal thread starter macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #4
    I think I'm going to try using PHPesp, which has been installed by my hosting service. Anyone know if there's a way to have both a dropbox and an "Other" text entry box using this system? I can probably do it manually, but that could be a lot of work, and I'm hoping there's a way within the interface, but I've never used it before.

    jW
     
  5. NoNameBrand macrumors 6502

    Joined:
    Nov 17, 2005
    Location:
    Halifax, Canada
    #5
    With straight up PHP/MySQL, I'd do it like this, never mind your skill level, it's not that hard to learn:

    1. set up a database in MySQL, with a table that has the following fields:

    id - primary key
    survey - ie, which survey, movies, games, etc
    entry - name of the movie, game, etc
    votes -

    I'd then set up a user account in MySQL with select,insert/update/delete rights to that db only.

    2. write a PHP page that has a ten field form, that on submission grabs the names out of the fields, and one by one, does a lookup for it in the database: if it can find it, then add the number of votes (10 for choice #1, for instance) to the total; if not, create a new record with that many votes.

    That's it, really. You can make it more complicated by suggesting likely names, or tracking the IPs or emails of responders to prevent ballot stuffing.
     
  6. Mal thread starter macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #6
    Now see, NoNameBrand, that's exactly what I was hoping to hear. The thing is, I dunno if I know enough php and MySQL at the moment to do that, any suggestions for where to start? (I'll check the thread for beginners at the top of this forum, but any other ideas are great.) From what I've seen, PHPesp won't be optimal, though it would probably work.

    Thanks!

    jW
     
  7. xelterran macrumors 6502

    Joined:
    Dec 28, 2001

Share This Page