Ok, I have this little bit of php code:
[code=php]
<?php
$query = “SELECT Company FROM Customer WHERE Sales_Rep = ‘$salesrep’;”;
$result = mysql_query($query) or die(“SQL Error: ” . $query . “<br>” . mysql_error());
$msg .= “<form enctype=’application/x-www-form-urlencoded’ method=’post’ target='<?php echo $_SERVER[‘PHP_SELF’]; ?>’>”;
$msg .= “<select name=’clients’ id=’clients’>”;
while ($row = mysql_fetch_assoc($result)) {
//$msg .= “<div class=’account’>”;
foreach ($row as $key => $val) {
//$msg .= “<span class=’act’>”.$key.” :</span><span class=’acp’>”.$val.”</span><br/>”;
$msg .= “<option value='”$val”‘ >”$val”</option>”;
}
//$msg .= “</div>”;
}
$msg .= “</select>”;
$msg .= “</form>”;
?>
Which I am trying to get to populate a select list with the specific value from the mysql table. The code that is commented out works fine but I want to be able to make a selection list, not just a list of the data in a page, so that I can then select a specific value and do stuff with the other data associated with it. Follow what I am trying to do?