title: PHP Variable inside PHP -> Echo -> Javascript
body: <p>so I have issue I don't even know how to tell it. But here it is.</p>
  
  <pre><code>//Coupon Code?
  if($row['coupon'] == null or $row['2email'] == 'Confirmed')
  {
  echo '&lt;td&gt;
  &lt;input type="text" onKeyup="trackChange(this.value)" id="myInput"&gt;
  &lt;script type="text/javascript"&gt;
  var dID = &lt;?php echo $dID; ?&gt;;
  function wait(ms){
  var start = new Date().getTime();
  var end = start;
  while(end &lt; start + ms) {
   end = new Date().getTime();
  }
  }
  
  function trackChange(value)
  {
  window.open("/functions.php?cCODE="+value+"&amp;ccID="+dID)
  
  }
  &lt;/script&gt;
  &lt;/td&gt;';
  </code></pre>
  
  <p>All I need is to get "user ID" from $dID=$row['ID']; but as it seems It just echo out that to the result and don't do any job. How can I get php variable inside php -> inside Echo -> inside Javascript.</p>
  
  <p>I thought by going other way but I need text box and then submit to url. But I can't seem to get it working. Only 1 request at a time and I need 2. (User ID, and text to text box response)</p>
  
  <pre><code>echo " &lt;td&gt;&lt;form action= functions.php?cID=  method= 'post'&gt;&lt;input 
  type='hidden' name='cID' value=$dID /&gt;
  &lt;input type= 'submit' name= 'type' value= Confirm&gt;&lt;/form&gt;&lt;/td&gt;";
  </code></pre>
  
  <p>So I can't get them both to submit that. Only found a way inside javascript.</p>
  
  <p><a href="https://i.stack.imgur.com/LrERO.png" rel="nofollow noreferrer">Picture of text field</a></p>