Jump to content

Sexy Php Code - Help!


TheFilmGod

Recommended Posts

Hi. I need help with some php. I need to change a bit of it. Right now I have a 5 star rating script on my page, but instead of clicking on the stars to vote, users click on radio buttons. I'd like to change this. I'm not the best in php, but I hope you can help me out.

 

echo '<input type="radio" value="5" name="rating_'.$page.'" id="rate5_'.$page.'" />Excellent<br>';
	echo '<input type="radio" value="4" name="rating_'.$page.'" id="rate4_'.$page.'" />Very Good<br>';
	echo '<input type="radio" value="3" name="rating_'.$page.'" id="rate3_'.$page.'" />Good<br>';
	echo '<input type="radio" value="2" name="rating_'.$page.'" id="rate2_'.$page.'" />Fair<br>';
	echo '<input type="radio" value="1" name="rating_'.$page.'" id="rate1_'.$page.'" />Poor<br>';
	echo '<input type="hidden" name="rs_id" value="'.$page.'" />';
	echo '<input type="submit" name="rate'.$page.'" value="Rate" />';
	}
	else
	{
	echo '<input type="radio" value="1" name="rating_'.$page.'" id="rate5_'.$page.'" />1';
	echo '<input type="radio" value="2" name="rating_'.$page.'" id="rate4_'.$page.'" />2';
	echo '<input type="radio" value="3" name="rating_'.$page.'" id="rate3_'.$page.'" />3';
	echo '<input type="radio" value="4" name="rating_'.$page.'" id="rate2_'.$page.'" />4';
	echo '<input type="radio" value="5" name="rating_'.$page.'" id="rate1_'.$page.'" />5<br>';
	echo '<input type="hidden" name="rs_id" value="'.$page.'" />';
	echo '<input type="submit" name="rate'.$page.'" value="Rate" />';
	}

 

Can you help me by giving any insight on how to change this so visitors can click on the stars to vote, or a picture of a star? I really hate radio buttons. Any help is greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/42929-sexy-php-code-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.