title: How to get/fetch HTML5 Range Slider's value in PHP?
body: <p>How do I get the value of my range slider that sits in a form?</p>
  
  <p>I cant get a value from it by just asking from the name.</p>
  
  <p>I use this JavaScript function to type out the value in the form beside the slider</p>
  
  <pre><code>    function showValue(newValue)    {
      document.getElementById("range").innerHTML=newValue;    }
  </code></pre>
  
  <p>Could I call from the div or something like that?</p>
  
  <p><strong>Edit!</strong>
  All right here we go, I'm sorry if I'm confusing you all, but English is not my native language. I will try and explain.</p>
  
  <p>I have a contact form in HTML5, that submits the data to <code>mail.php</code>.</p>
  
  <pre><code>&lt;input type="text" name="name"/&gt;
  &lt;input type="email" name="email"/&gt;
  </code></pre>
  
  <p>In <code>mail.php</code> I fetch the value from the input boxes by</p>
  
  <pre><code>$name = $_POST['name'];
  $email = $_POST['email'];
  </code></pre>
  
  <p>And then processing further to send the actual mail.</p>
  
  <p>So far, so good?</p>
  
  <p>I have a Range Slider that determines how many passengers user want to book.</p>
  
  <pre><code>&lt;input type="range" min="1" max="12" step="1" value="1" name="passengers" onchange="showValue(this.value)" /&gt;
  &lt;span id="range"&gt;1&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I use JavaScript function because I want to show the current selected value of the slider to the user as he/she progresses through the form.</p>
  
  <p>But I myself of course want to get this value in <code>mail.php</code> to the send mail as well. I can`t request value from the range name. So I was wondering if maybe I could access the value from the div id range or something?</p>