Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7992591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:36:23+00:00 2026-06-04T13:36:23+00:00

I want to let my users create their own polls so they could paste

  • 0

I want to let my users create their own polls so they could paste my code somewhere on their website and users may rate their own game characters (with 1-5 stars rating).

I want to use jQuery or javascript for this purposes, but I have no idea how to start developing something like that. It should be free from being spoofed in any way, so I’d like to store the poll records in my database table (MySQL).

You probably had some experiences on this case, so I’m waiting for your suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:36:25+00:00Added an answer on June 4, 2026 at 1:36 pm

    Here is what I would do in a nut shell

    First you are going host a javascript file and images for the stars somewhere, preferably on a CDN.

    Second you need to setup a php file (or java or ruby or whatever you like for server-side) that can send and receive data via JSONP.

    From here you ask your users to simply include the remote javascript file in the document head, and div on the page with a special class to signify that star rater (for this example .star).

    Tasks:

    1. Javascript: Populate all instances of <div class="star"></div> with your star images and set up.

    2. Javascript: Request current rating tally average from server via JSONP with full identifiers (see step 4).

    3. PHP: Use identifiers to find predetermined average of star rating so far, return current average rating as JSON. If non is found return ‘unrated’ state in JSON.

    4. Javascript: Style stars so they all look correct, either displaying the current rating average received from ajax, or unrated state.

    5. Javascript: Setup basic behaviors (hover style change ect.)

    6. Javascript: Create click event bindings to stars. When user clicks you will have to send information about the rating to the server via AJAX JSON. This information needs to include the rating itself along with the url of the rater and any other identifiers.

      something like:

      {
           url : 'http://endUsersite.com/pagetoberated.html',
           starId : 'pictureOfBillMurray',
           rating : 4,
           raterIP : 192.168.1.130
           date   : UTCstringhere
      }
      
    7. Javascript: Restyle to show rating in progress and prevent future ajax from clicks.

    8. PHP: Catch the JSON, process and store it in mySQL

    9. PHP: After successful storage respond to ajax call with JSON stating the rating was successful

    10. Javascript: upon getting ‘success-response’ of JSON, style stars to show successfully rated.

    11. PHP: process ratings to determine new average.

    You will most likely also want to implement some kind of timing system on the server-side to prevent rating spamming from the same IP address.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I let registered users create their own personal website, and I
I want to enable the users of my website to upload their Java programs
We want to let users click a thumbs up or thumbs down button from
I want to let users upload Images. The file gets re-named (by adding the
I want to build a flash app to let me and my users snap
I want to implement functionality which let user share posts by other users similar
I want to be able to create a text file and let the user
I'm using OmniAuth as a way to let users link their social networks into
I want to create a web service for my clients so they can display
Let say I want to create comic reader app where the user can download

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.