Php star rating script

Discussion in 'PHP' started by ghosh.ag, Mar 17, 2011.

  1. #1
    I trying to write php star rating script but I cannot able to save value into my database
    when I was clicked on star image icon and also I cannot able to display proper value
    when I was clicked on a single star .

    Thanks
     
    ghosh.ag, Mar 17, 2011 IP
  2. JoelLarson

    JoelLarson Peon

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The simplest way that I can think of to create this functionality (without javascript or a client-side code) is in this instance:

    Create the grouping of stars, have the URL for each star be: rating.php?id=3424&rating=1 (This can be a rating of 1-5)
    When a ratings exists for a video, search for a rating in the database. If one exists, update it. If one doesn't exist, create it.
    When the user reloads the page, have a query find if the rating was made, then do some if statements to show a star or "the picked star" when shown.
     
    JoelLarson, Mar 17, 2011 IP