I have the JQuery UI Slider implemented for age:
Javascript:
<script>
$(function() {
$( "#slider-range" ).slider({
range: true,
min: 0,
max: 50,
values: [ 0, 50 ],
slide: function( event, ui ) {
$( "#amount" ).val( "" + ui.values[ 0 ] + " - " + ui.values[ 1 ] );
}
});
$( "#amount" ).val( "" + $( "#slider-range" ).slider( "values", 0 ) +
" - " + $( "#slider-range" ).slider( "values", 1 ) );
});
</script>
HTML
<td> <label for="amount">Age:</label></td>
<td>
<div id="ageslider">
<p><input type="text" id="amount" style="border: 0; color: #f6931f; font-weight: bold;" /></p>
<div id="slider-range"></div>
</div>
</td>
I need to get both values (age from and age to) for a PHP query. I have seen a similar question here, but it does not concern PHP. How can I get the values and assign it to a var for a PHP query?
Edit:
Full form:
<form action="#" method="POST" enctype="multipart/form-data">
<td> <label for="amount">Age:</label></td>
<td>
<div id="ageslider">
<p><input type="text" id="amount" style="border: 0; color: #f6931f; font-weight: bold;" /></p>
<div id="slider-range"></div>
</div>
</td>
<td rowspan="2">
<input type="submit" class="btn btn-info" name="submit" value="Click to start chat! " />
</td>
</tr>
<tr>
<td><label for="amount">Gender:</label> </td>
<td>
<input type="radio" name="gender" value="male">Male</input>
<input type="radio" name="gender" value="female">Female</input>
</td>
</form>