Thanks bradgrafelman. Just had to change
<option value=$customer_id
to
<option value=<\"$customer_id\"
It's always the simple things. Flippin Idiot....
Here it is for anyone who wants it.
function build_customer1() {
require_once ('./mysql_connect.php'); // Connect to the database
$query = "SELECT customer_id, CONCAT(last_name, ', ', first_name) AS name FROM customer_info ORDER BY last_name ASC";
$result = @mysql_query($query);
while($row = @mysql_fetch_array($result, MYSQL_NUM)) {
$customer_id = $row[0];
$name = $row[1];
echo "<option value=\"$customer_id\"";
if(isset($_POST['customer']) && $_POST['customer'] == $customer_id) {
echo 'selected';
}
echo ">$name</option>";
}
}