title: Get customer info from database after selecting dropdown using php/ajax
body: <p>i'm trying to make a simple webpage for making invoices. to select/load customer info i'm using a <a href="/questions/tagged/select" class="post-tag" title="show questions tagged &#39;select&#39;" rel="tag">select</a> dropdown filled with all the customers in the database. 
  after selecting a customer i want php to get all the values of that customer from the database and echo somewhere else on the page. 
  thought it would be something simple but tried everything and cant seem to get it to work.</p>
  
  <p>any help?</p>
  
  <p>after deleting all the code that didn't work anyway this is what i'm left with:</p>
  
  <pre><code>&lt;select name="selectCustomer"&gt;
      &lt;option selected&gt;Klantnaam&lt;/option&gt;
      &lt;?
          $result = mysql_query('SELECT * FROM '.$c_tbl_name);
  
          while($row = mysql_fetch_array($result)) {
              echo    '&lt;option value="'.$row['c_id'].'"&gt;';
              echo        $row['c_name'];
              echo    '&lt;/option&gt;';
          }
      ?&gt;
  &lt;/select&gt;
  </code></pre>