Geos59
06-19-2008, 11:56 AM
Ok I got the 5 star rating system created. Here is a link to what I have:
Sol-Badguy Wallpaper (http://animepwns.com/order-sol-wallpaper.asp)
The problem is when you vote and go back to that page, the stars are blank. I asked the creator (AKA the one who helped me.) and got this respone:
To display a number of stars you need to query the database to get the current rating and then in the page include a switch statement:
switch(currentRating)
{
case 0: // don't do anything
case 1: // set the 1st div's background to filled star
...
case 5:// set all 5 stars to filled star
}
Can someone simplify this, (to a incredibly simple degree.) since code like this is new to me?
Sol-Badguy Wallpaper (http://animepwns.com/order-sol-wallpaper.asp)
The problem is when you vote and go back to that page, the stars are blank. I asked the creator (AKA the one who helped me.) and got this respone:
To display a number of stars you need to query the database to get the current rating and then in the page include a switch statement:
switch(currentRating)
{
case 0: // don't do anything
case 1: // set the 1st div's background to filled star
...
case 5:// set all 5 stars to filled star
}
Can someone simplify this, (to a incredibly simple degree.) since code like this is new to me?