# \[UI SLIDER] Ui slider with text box input (ok)

![](https://2726517656-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1E4Gk2ppVKb4olmnun%2F-MR0qpYaBEl6m3FDaMst%2F-MR0u-EfyPsbij33AN9K%2FScreenshot_1.jpg?alt=media\&token=080a431f-66cd-4810-9041-f9b03a5d08c4)

![](https://2726517656-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1E4Gk2ppVKb4olmnun%2F-MR0qpYaBEl6m3FDaMst%2F-MR0u5fgwSxJ5mDA2-B3%2FScreenshot_2.jpg?alt=media\&token=f256ac08-c76c-4082-9a12-af839c9676c3)

```
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Slider - Range slider</title>
  <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script type="text/javascript">
  $( function() {
    $( "#slider-range" ).slider({
      range: true,
      min: 0,
      max: 500,
      values: [ 0, 300 ],
      slide: function( event, ui ) {
        $( "#amount1" ).val(ui.values[ 0 ]);
        $( "#amount2" ).val( ui.values[ 1 ] );
      }
    });
    $( "#amount1" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + " -- $" + $( "#slider-range" ).slider( "values", 1 ) );
    $( "#amount2" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + " -- $" + $( "#slider-range" ).slider( "values", 1 ) );
  } );
  </script>
</head>
<body>
 
<p>
	<form action="http://localhost/php" method="GET">
	  <label for="amount">Price range:</label>
	  <input type="text" id="amount1" name="amount1"  style="border:0; color:#f6931f; font-weight:bold;">
	  <input type="text" id="amount2" name="amount2"  style="border:0; color:#f6931f; font-weight:bold;">
	  <button type="submit" class="btn btn-primary">Submit</button>
  </form>
</p>

<div id="slider-range"></div>
<?php  
	if(isset($_GET)) {
		echo '<pre>';
			var_export($_GET);
		echo '</pre>';
	}
?> 
 
</body>
</html>
```
