I am attempting to create a drop-down menu that links to user profile pages and includes user images next to it. I am a bit new to PHP so bear with me if this is a simple question. Here is the code I've created:
function dropdown() {
$query = "SELECT * FROM usersbadges";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
$name=$row['name'];
$image=$row['image'];
}
mysql_close();
}
$options.=<option value=\$name\>.$image </option>;
<select name=name>
<option name=0>
print $options
</select>
It tells me that the < brackets are unexpected but I'm at a loss as to how to put them. If those were fixed, would this code create me a drop down menu with user names accompanied by their images? I'd just like to know if I'm on the right track/what the next step is. All help is greatly appreciated