Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Get in PHP rating value from a dynamic bar

User drag bar and i need value in PHP



10:12 pm on Jul 22, 2011 (gmt 0)

5+ Year Member

For each article I have a rating script and user drag the bar to select a value from 1 to 10. The current value selected by user is displayed in browser eg. 5 stars.

I do not know how to get that value in the input form, to upload it in mysql database.

The value is named value in code
 + value + ' stars'

Here is the code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://www.mysite.com/js/rating.js"></script>

<div id="rating-22"></div>
<div id="result-22"></div>
<div id="currentval-22"></div>

<script type="text/javascript">
maxval: 10, interval: 1, defaultValue: 4,
finishedCallback: function (value) {
('You selected: ' + value)
moveCallback: function (value) {
$('#currentval-22').html('<strong>' + value + ' stars' + '</strong>')

<form method="post" action="http://www.mysite.com/<?php echo $article_id;?>.html">

<input type="hidden" name="slidy_rating_value" value="HERE_I_NEED_RATING_VALUE">



Any help is appreciated. Thanks


12:15 am on Jul 23, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

add line

$('#currentval-22').html('<strong>' + value + ' stars' + '</strong>');

and add id to input element

<input id=idSlidy type="hidden" name="slidy_rating_value" value="HERE_I_NEED_RATING_VALUE">


12:36 pm on Jul 23, 2011 (gmt 0)

5+ Year Member

Is working, thanks!

It does not refreshing in source code, but when i get data from input with POST the correct value is there.

Featured Threads

Hot Threads This Week

Hot Threads This Month