$i = 0; $query = "SELECT * FROM segments WHERE stageID = $stageID"; $result = mysql_query($query, $db); if ($result) { while ($r = mysql_fetch_array($result)) { if ($i == 0) { echo '
Choose a course:
'; } $file = "dot_red.png"; if ($r['color'] == '#ff0202') { $file = "dot_red.png"; } if ($r['color'] == '#fe6702') { $file = "dot_orange.png"; } if ($r['color'] == '#fefe35') { $file = "dot_yellow.png"; } if ($r['color'] == '#02fe35') { $file = "dot_green.png"; } if ($r['color'] == '#3567fe') { $file = "dot_blue.png"; } if ($r['color'] == '#cc00ff') { $file = "dot_purple.png"; } if ($r['color'] == '#ff6699') { $file = "dot_pink.png"; } if ($r['color'] == '#999999') { $file = "dot_grey.png"; } echo '
" . $r['name']; echo "
"; echo '
mi'; echo '
km
'; $i++; } mysql_free_result($result); if ($i > 0) { echo '
...or create a new course:'; } else { echo '
Create a new course:
'; } } ?>
Label:
Color:
red
orange
yellow
green
blue
purple
pink
grey
remove last point
clear segment