title: How to get html textbox value in PHP
body: <p>I dynamically created a textbox in php:</p>
  
  <pre><code>echo '&lt;td&gt;&lt;input name="txtEmail" id="txtEmail" type="text" /&gt; &lt;/td&gt;';    
  </code></pre>
  
  <p>Now i wanna pass the value of this textbox in javascript funcion. I have a updatebutton and i am passing the value on the onclick event, but it is not working. Here is my updatebutton code:</p>
  
  <pre><code>echo '&lt;td&gt;&lt;input id="btnUpdate" type="submit" name="btnUpdate" value =  "Update" onclick="updateButton(' . document.getElementsByName('txtEmail')[0].value . ')" /&gt; &lt;/td&gt;';
  </code></pre>
  
  <p>Here is my JavaScript function:</p>
  
  <pre><code>function updateButton(custEmail)
  { alert (custEmail); }
  </code></pre>