Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][JavaScript]Gwiazdki do oceniania
zavada
post
Post #1





Grupa: Zarejestrowani
Postów: 68
Pomógł: 6
Dołączył: 15.06.2009
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Witam!
Mam trzy pliki: star.png, star_grey.png i star_bronze.png
Chcę zrobić system oceniania. Z php i mysql nie mam problemu, ale jak zrobić najeżdżanie na gwiazdki? To znaczy średnia ocen to 3/5. Więc skrypt pisze kod:

  1. <img src="star_bronze.png">
  2. <img src="star_bronze.png">
  3. <img src="star_bronze.png">
  4. <img src="star_grey.png">
  5. <img src="star_grey.png">


Ale jak zrobić to, że jak najadę na 2. gwiazdkę to wygląda tak:
  1. <img src="star_gold.png">
  2. <img src="star_gold.png">
  3. <img src="star_bronze.png">
  4. <img src="star_grey.png">
  5. <img src="star_grey.png">


A jak najadę na 4. to wygląda tak:?
  1. <img src="star_gold.png">
  2. <img src="star_gold.png">
  3. <img src="star_gold.png">
  4. <img src="star_gold.png">
  5. <img src="star_grey.png">


Wiem, wiem. Jest dużo takich tematów, ale w żadnym nie znalazłem tego, co chcę.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 05:04