title: Run php alphabetic index on click
body: <p>I want to make an alphabetic index of content in a mysql database.</p>
  
  <p>the second part is not my problem, what I have code is the buttons, and, when pressing o one of the letter buttons, run a mysql query with the letter. </p>
  
  <p>I have coded a form for every letter like this:</p>
  
  <pre><code>&lt;form action="query.php?x=A" method="get"&gt;
         &lt;input type=submit value="A"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>changing <code>"A"</code> with every letter.</p>
  
  <p>then in <code>query.php</code> I have a <code>$_get["x"]</code> and with it I run the query.</p>
  
  <p>so, I have 27 forms, but that is very dirty, is there any other way to write it?</p>
  
  <p>and, if its possible, is there any way to run the mysql query in the same page? (to be able to run another letter.)</p>