Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Collecting votes on a webpage

  1. #1
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Collecting votes on a webpage

    I have seen various forms on forums where you set up a voting thing,
    and others browsing a thread can vote on some silly thing.

    What is the right tool to do something like this on a simple webpage?

    I was thinking something like two pictures (left and right), like Lennon versus Bush or something, and the viewer just clicks a button to vote for the picture/item/person of their choice, but only once per visit or IP address.

    Very simple idea, but should it be a form, or javascript, or what?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's a simple form, but it's backed by a server-side script and often a database.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hmmm, sounds like it either can't be or hasn't been done without resorting to server-side antics.

    I was hoping there was some way to store info in a simple textfile and display the current vote/score for the voter, without having to involve the server.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Afraid not. You're going to have to store results on the server at least, aren't you.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes. I guess what I meant was, storing the results independantly on the server, without getting involved in PHP, server-side programming, or databases.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    To store something on the server you'll need at least some form of server-side scripting.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It seems strange that if you can upload textfiles remotely without bothering the server, why can't you save a single keystroke, even if you have to use a Java Applet or something? Maybe that actually is 'server-side' but I guess the question is, is there a very simple tiny file and a few lines of code that would do such a simple task, even if you have to compile an applet or a bit of Python first?

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It seems strange that if you can upload textfiles remotely without bothering the server
    You can't. As you guessed, there must be a server-side component as well, which the applet would connect to - and so long as you're doing that, you might as well just use a form.
    is there a very simple tiny file and a few lines of code that would do such a simple task, even if you have to compile an applet or a bit of Python first?
    Python is interpreted There most certainly are several very simple ways of doing this, but they all need server-side interaction. You could use an applet to connect to an FTP server running on the site, eliminating the need for a server-side script, but this would be very insecure, as it would need read-write access and would contain the username and password for the site, rendering your data open to arbitrary editing by anyone with the skill to find them.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow, that is important information. So what I was thinking was not possible without a serious breach of security?

    The voting data itself is not important, perhaps even frivolous, but I didn't realize you had to put a password (embedded and encoded?) inside your applet! Ouch!

  10. #10
    Join Date
    Nov 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So how could this be done with a database? Is it pretty simple...or no?

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
  •