Hello kind users of PHPBuilder.
I'm having a bit if touble loading MySQL into a drop down box.
What I want is to display just one record for each different bit of information.
so at the moment i have:
TEST
TEST
TEST
TEST1
TEST1
TEST1
TEST1
TEST2
displaying in my drop down box and i want this:
TEST
TEST1
TEST2
I'm using the below code with no prevail.
<option value="other" selected="selected">Other:</option>
<?
$projectsql=mysql_query("SELECT type FROM some_DB GROUP BY type ASC LIMIT 1");
if ($projectsql){
$project = mysql_fetch_array($projectsql);
$prjctchk = mysql_num_rows ($prjctsql);
while($prjctchk < 0) {
?>
<option value="<? echo $project['type']; ?>"><? echo $project['type']; ?></option>
<?
};
?>
<?
}else{
echo mysql_error();
};
Any help appreciated!!