hi all,
i need a help to fix this problem tho..
here is my code
<label for="title">Title:</label>
<select name="title">
<?php
echo "title:".$listAdmin[0]['title'];
$title = array('Mr.','Ms.','Mrs.');
foreach ($title as $keytitle){
if($listAdmin[0]['title']==$keytitle)
$selected="selected";
else
$selected=" ";
}
printf("<option value='%s'%s>%s</option>",$keytitle,$selected,$keytitle);
?>
</select>
i'm doing an edit page for admin. but when to display a dropdown menu it doesn't work as it should be. it just display the exact title from the database instead of all title listed.
can anybody help me?
thanks..