title: Inputing drop list"option value" into javascript function
body: <p>I am trying to create a document title timer function which reflect the selected login time the user choose using a drop down list.</p>
  
  <p>So far i have gotten the timer working with a default time of 30 seconds and i am having problem linking the drop down "option value" to my javascript. </p>
  
  <p>What i dont understand is that wont my variable $droptime dynamically grab the value from the drop down "option value" ?</p>
  
  <p><strong>index.php</strong></p>
  
  <pre><code>&lt;form id="form1" align="left" method="POST" action="second.php"&gt;
  &lt;select name ="droptime"&gt;
   &lt;option id="5" value="5" &gt;5 Seconds&lt;/option&gt;
   &lt;option id="10" value="10"&gt;10 Seconds&lt;/option&gt;
   &lt;option id="15" value="15"&gt;15 Seconds&lt;/option&gt;
   &lt;option id="30" value="30"&gt;30 Seconds&lt;/option&gt;
  &lt;/select&gt;   
  &lt;/form&gt; 
  </code></pre>
  
  <p>This is my javascript for the document title</p>
  
  <p><strong>second.php</strong></p>
  
  <pre><code>&lt;?php
  session_start();
  $drop_time = $_SESSION['droptimeD'];
  ?&gt;
  
  &lt;script language="javascript" type="text/javascript" src= "index.php"&gt;
      &lt;!-- //
  
      var m = &lt;?php echo $drop_time; ?&gt; ;
      var i = new Number(m);
      function titleTimer(){
      document.title = "Time till logout - " + i + " seconds.";
      i -= 1;
      if(i &lt; 0){
      document.title = "Please login Again"
      window.location.replace("index.php");
      }else{
      setTimeout("titleTimer()", 1000);
      }
      }
      // --&gt;
      &lt;/script&gt;
  </code></pre>
  
  <p>I apologies if there might be a duplicate question. I did search through the forum and tried multiple solution to no available and i suspect i am missing a crucial part to get it to work.</p>