debug
$selectstr


"; $qh = mysql_query( $selectstr); if (mysql_errno() > 0) { echo "\n" . mysql_errno(). ": " . mysql_error() . "
"; } $num_rows = mysql_num_rows ($qh); $data_array = array(); for ( $i = 0; $i < $num_rows; $i++) { $row = mysql_fetch_array ($qh); if ($ss->$columnname == $row['value_name']) { $select_string = "selected"; } else { $select_string = ""; } printf( "\n", $select_string, '"', $row[ 'value_name'], '"', $row['label_name']); } // for // *********************************************** } // function $testing=0; if ($testing == 1) { include_once( "race.class.php"); include_once("db.config.php"); mysql_select_db( "rtg2t_test"); $ss = new Race; $ss->sex = "M"; echo "answer is Male\n"; datadict_select( $ss, "race", "sex"); } ?>