How to assign values to jquery slider from a dropdown menu after querying for a database?
<p>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.</p>

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

<pre><code>&lt;script&gt;
                $(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" ) );

                });
            &lt;/script&gt;


            &lt;form id="form1" name="form1" method="post" action="dumb.php"&gt;

                Display Name :
                &lt;select Name='layout' class="selector"&gt;
                &lt;option value=""&gt;--- Select ---&lt;/option&gt;
                &lt;?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)&amp;&amp;$select!=""){
                    $select=$_POST ['NEW'];
                }
                ?&gt;
                &lt;?php
                    $list=mysql_query("SELECT display,displayid FROM display");
                    while($row_list=mysql_fetch_array($list)){
                ?&gt;
                        &lt;option value="&lt;?php echo $row_list['displayid']; ?&gt;"&gt;&lt;?php echo $row_list['display'] ?&gt; 
                        &lt;/option&gt;
                &lt;?php
                    }
                ?&gt;
                &lt;/select&gt;
                &lt;br/&gt;
                &lt;br/&gt;
                Display Group Name :
                &lt;select Name='displaygroup' &gt;
                &lt;option value=""&gt; --- Select --- &lt;/option&gt;
                &lt;?php
                    $temp = '0';
                    $list_group=mysql_query("SELECT DisplayGroupID,DisplayGroup FROM displaygroup WHERE IsDisplaySpecific = '$temp'");
                    while($row_group=mysql_fetch_array($list_group)){
                ?&gt;
                        &lt;option value="&lt;?php echo $row_group['DisplayGroupID']; ?&gt;"&gt;&lt;?php echo $row_group['DisplayGroup'] ?&gt; 
                        &lt;/option&gt;
                &lt;?php       
                    }
                ?&gt;
                &lt;/select&gt;

                &lt;div class="demo"&gt;

                    &lt;p&gt;
                        &lt;label for="amount"&gt;Volume Level :&lt;/label&gt;
                        &lt;input type="text" id="amount" class="size2" value="aduket" style="border:0; color:#f6931f; font-weight:bold;" /&gt;

                    &lt;/p&gt;
                    &lt;div id="slider-range-min"&gt;&lt;/div&gt;
                    &lt;p&gt;
                        &lt;label for="ali"&gt; Brightness Level : &lt;/label&gt;
                        &lt;input type ="text" id="ali" class="size1" name="dumb" style="border:0; color:#f6931f; font-weight:bold;"/&gt;

                    &lt;div id="slider-range-max"&gt;&lt;/div&gt;
                    &lt;p&gt;
                        &lt;label for="col"&gt; Color Level : &lt;/label&gt;
                        &lt;input type ="text" id="col" class="size1" name="dumb" style="border:0; color:#f6931f; font-weight:bold;"/&gt;

                    &lt;div id="slider-color"&gt;&lt;/div&gt;
                    &lt;br/&gt;
                    &lt;p&gt;
                        &lt;label for="standbyon"&gt; Standby On : &lt;/label&gt;
                        &lt;input type="checkbox" id="standbyon" name="standbyon" /&gt;
                        &lt;label for="standbyoff"&gt; Standby Off : &lt;/label&gt;
                        &lt;input type="checkbox" id="standbyoff" name="standbyoff" /&gt;
                    &lt;/p&gt;

                    &lt;input type="submit" name="Submit" value="Submit" /&gt;


                    &lt;/div&gt;&lt;!-- End demo --&gt;


                    &lt;input type="hidden" id="volume" name="volume"/&gt;
                    &lt;input type="hidden" id="brightness" name="brightness"/&gt;
                    &lt;input type="hidden" id="color" name="color"/&gt;

        &lt;/form&gt;
</code></pre>

<p>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.</p>
