The situation is very simple and find this weird why i fail to insert an image after each result in my combobox (dropdown menu).
I am trying to insert $image here!.
<select name = 'pSelect' id = 'pSelect'>
<?php
$result = mysql_query
("
SELECT ID, Project, Projectnummer, Klant
FROM tblproject
WHERE Status = '1'
ORDER BY Klant ASC
");
$image = "<img src='images/status_groen.png' width='15' height='15' /> ";
while($row1 = mysql_fetch_array($result))
{
$pID = $row1['ID'];
echo "<option value=\"" . $row1['ID'] . "\"";
if (isset($_POST['pSelect']) && $row1['ID'] == $_POST['pSelect'])
{
echo " selected='selected'";
}
echo ">" . $row1['Klant'] ." ". $row1['Project'] ." ". $row1['Projectnummer'] ." ".$image. "</option>";
echo "<br/>'";
}
?>
</select>
after data output it shows the image syntax in red, indicating it might be a syntax problem but not necessarely.
Source output:
<option value="202">3DNL reCAPTCHA toevoegen 13097/1 <img src='images/status_groen.png' width='15' height='15'/> </option><br/>