title: how to perform sql command on html page with user input field, and show result on the same page
body: <p>i write a command, or i fill up parameter value from user input field. click the button, send this command to php and send resultant value back to html to display.
  for example. on html page :</p>
  
  <pre><code>select ___ from ____, 
  </code></pre>
  
  <p>two available input field i fill up with "tablenameone" and "valueone". then, result will be printed on html text field on the same page.</p>
  
  <p>what i do know is those value can be sent(perhaps) as in such format</p>
  
  <pre><code>$('input[name="talbename"]') 
  $('input[name="value"]')
  example.com?tablename=tablenameone&amp;value=valueone
  </code></pre>
  
  <p>and from php side i use</p>
  
  <pre><code> $sql="SELECT '$_GET['value']' FROM '$_GET['tablename']';
  </code></pre>
  
  <p>what i dont know is that....how exactly should i perform this in a click function? its for sure using ajax. but how can i produce  example.com?tablename=tablenameone&amp;value=valueone
  and where should i put $('input[name="value"]')</p>
  
  <p>thanks in advance :D </p>