i'm trying to make a simple webpage for making invoices. to select/load customer info i'm using a select 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.
any help?
after deleting all the code that didn't work anyway this is what i'm left with:
<select name="selectCustomer">
<option selected>Klantnaam</option>
<?
$result = mysql_query('SELECT * FROM '.$c_tbl_name);
while($row = mysql_fetch_array($result)) {
echo '<option value="'.$row['c_id'].'">';
echo $row['c_name'];
echo '</option>';
}
?>
</select>