This is a discussion on "Rounding & Rating System." within the PHP Forum section. This forum, and the thread "Rounding & Rating System. are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Rounding & Rating System.
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Rounding & Rating System.
I have a variable called $act_rating which contains the rating of a website. This is for my Flash Gallery Project, which will display the best flash sites on the net I hope!
If $act_rating, is say, 4, I want to display an image with 4 stars, if it is 3, I want it to display an image with 3 stars, etc. But the $act_rating variable contains an average so it could be decimals. How Can I round the number to 0 decimal places? So 4.3 = 4, 3.5 = 4. And how would the best way be to do the rating form? A radio box for each rating? Cheers, Jack
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
|
|
||||
|
Re: Rounding & Rating System.
This should help out with the rounding.
I'm not sure how people code this, but I like it when there's a star for each rating, and you click on the one you want, and the number of stars are highlighted depending on what the rating is. In other words, the rating like iMDB
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
|
|
||||
|
Re: Rounding & Rating System.
Yeh so do I, but I have no idea how! I've got a slight idea, I'll experiment with it.
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
|||
|
Re: Rounding & Rating System.
I used one of these before, just googled and integrated it, I'm not entirely sure but I think it was this one - http://www.masugadesign.com/the-lab/...ar-rating-bar/
|
|
||||
|
Re: Rounding & Rating System.
Thanks able, but I now have one working, stars n all
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Spinal007 - Anyone recommend a good rating/star rating script? | sing2trees | PHP Forum | 17 | Jun 8th, 2008 21:23 |
| Please help, 2 way feedback rating system | marie2007 | PHP Forum | 0 | Sep 13th, 2007 01:25 |
| Poll/Rating System | lexxweb | JavaScript Forum | 1 | Dec 9th, 2006 21:27 |
| Rating system... | courtjester | Classic ASP | 2 | May 22nd, 2004 12:36 |