How to assign values to jquery slider from a dropdown menu after querying for a database?
===

In my application, I used 3 j-query sliding bar to show 3 options. Those options are contrast,volume and brightness of a tv that I used them to change tv's respective effects. I already created database for those attributes for each client and create the communication between server and client. After setting 3 of those values I update my database in another action file. However what I need is, I want to show users of server side to see what current value of those 3 attributes on my sliders. There is a dropdown menu for choosing the client so after choosing a client users should see what are the current setup on server.

I just cant figure how to do this. Any help or idea will be really helpful.



    <script>
					$(function() {
						$( "#slider-range-min" ).slider({
							range: "min",
							value: 0,
							min: 0,
							max: 63,
							slide: function( event, ui ) {			
								$("#amount").val("" + ui.value);	
							},
							change: function(event, ui) { 
								$('#volume').attr('value', ui.value);
						}});
						$( "#slider-range-max" ).slider({
							range: "min",
							value: 0,
							min: 0,
							max: 128,
							slide: function( event, ui ) {			
								$("#ali").val("" + ui.value);	
							},
		
							change: function(event, ui) { 
								$('#brightness').attr('value', ui.value);
						}});
						$( "#slider-color" ).slider({
							range: "min",
							value: 0,
							min: 0,
							max: 128,
							slide: function( event, ui ) {			
								$("#col").val("" + ui.value);	
							},
							change: function(event, ui) { 
								$('#color').attr('value', ui.value);
						}});
						$( "#amount" ).val( $( "#slider-range-min" ).slider( "value" ) );
						$( "#ali" ).val( $( "#slider-range-max" ).slider( "value" ) );
						$( "#col" ).val( $( "#slider-color" ).slider( "value" ) );
						
					});
				</script>
				

				<form id="form1" name="form1" method="post" action="dumb.php">
				
					Display Name :
		            <select Name='layout' class="selector">
		            <option value="">--- Select ---</option>
		            <?php
		                $con = mysql_connect ("localhost","username","password");
						if (!$con)
						{
							die('Could not connect: ' . mysql_error());
						}
		                mysql_select_db ("mydatabase" , $con);
		                $select="deneme";
		                if (isset ($select)&&$select!=""){
		                $select=$_POST ['NEW'];
		            }
		            ?>
		            <?php
		                $list=mysql_query("SELECT display,displayid FROM display");
						while($row_list=mysql_fetch_array($list)){
		            ?>
		                    <option value="<?php echo $row_list['displayid']; ?>"><?php echo $row_list['display'] ?> 
		                    </option>
					<?php
						}
					?>
					</select>
					<br/>
					<br/>
					Display Group Name :
					<select Name='displaygroup' >
					<option value=""> --- Select --- </option>
					<?php
						$temp = '0';
		                $list_group=mysql_query("SELECT DisplayGroupID,DisplayGroup FROM displaygroup WHERE IsDisplaySpecific = '$temp'");
						while($row_group=mysql_fetch_array($list_group)){
					?>
							<option value="<?php echo $row_group['DisplayGroupID']; ?>"><?php echo $row_group['DisplayGroup'] ?> 
							</option>
					<?php		
		                }
		            ?>
		            </select>
				
					<div class="demo">
						
						<p>
							<label for="amount">Volume Level :</label>
							<input type="text" id="amount" class="size2" value="aduket" style="border:0; color:#f6931f; font-weight:bold;" />
							
						</p>
						<div id="slider-range-min"></div>
						<p>
							<label for="ali"> Brightness Level : </label>
							<input type ="text" id="ali" class="size1" name="dumb" style="border:0; color:#f6931f; font-weight:bold;"/>
							
						<div id="slider-range-max"></div>
						<p>
							<label for="col"> Color Level : </label>
							<input type ="text" id="col" class="size1" name="dumb" style="border:0; color:#f6931f; font-weight:bold;"/>
							
						<div id="slider-color"></div>
						<br/>
						<p>
							<label for="standbyon"> Standby On : </label>
							<input type="checkbox" id="standbyon" name="standbyon" />
							<label for="standbyoff"> Standby Off : </label>
							<input type="checkbox" id="standbyoff" name="standbyoff" />
						</p>
						
						<input type="submit" name="Submit" value="Submit" />
						
						
						</div><!-- End demo -->
			
						
						<input type="hidden" id="volume" name="volume"/>
						<input type="hidden" id="brightness" name="brightness"/>
						<input type="hidden" id="color" name="color"/>
						
			</form>



That is the code piece that runs for server side. I need to set those value: attributes with current setup for chosen display however I cant find a way.