Replace the $result in this one:
<?php while($rows=mysql_fetch_array($result)) { ?>
<option><?php echo $rows['crs_code']; ?>//Line 108</option>
<?php } ?>
to $sql because your $sql variable is what holds your query.
$result holds the mysql_num_rows value.