Can anyone tell me how to get this code working?
if ($othr_Ethn == 1)
$string .= " $othr_Ethn_txt, ";
Below is the full code, everything else works, I want to pull the text info from the DB if $other_Ethn == 1 but I am not sure what I am missing.
$sql = mysql_query("SELECT * FROM ethn WHERE userId = 'test'");
while($r = mysql_fetch_array($sql)) {
$string = "";
if ($asian == 1)
$string .= "Asian, ";
if ($black == 1)
$string .= "Black/African, ";
if ($east_indian == 1)
$string .= "East Indian, ";
if ($mid_eastern == 1)
$string .= "Middle Eastern, ";
if ($hispanic == 1)
$string .= "Latino/Hispanic, ";
if ($native == 1)
$string .= "Native American, ";
if ($pac_haw == 1)
$string .= "Pacific Islander/Hawaiian, ";
if ($white_eu == 1)
$string .= "White/Caucasian, ";
if ($othr_Ethn == 1)
$string .= " $othr_Ethn_txt, ";
$string = rtrim($string, ", ");
echo " $string \n";
}