I want that if I click on the select option , the image will appear below , how to do that here's my code:
<?php
include('connection/connect.php');
$YearNow=Date('Y');
$dsds=$rowasa['posid'];
$results = $db->prepare("SELECT * FROM candidates,student,school_year,partylist where student.idno = candidates.idno AND school_year.syearid = candidates.syearid AND posid =:a AND candidates.partyid = partylist.partyid AND school_year.from_year like $YearNow");
$results->bindParam(':a', $dsds);
$results->execute();
for($i=0; $rows = $results->fetch(); $i++){
?>
<option style="padding: 35px 50px 35px 80px; background:url('admin/savephp/images/<?php echo $rows['image']; ?>') no-repeat scroll 5px 7px / 70px auto rgba(0, 0, 0, 0);"
value="<?php echo $rows['candid'] ?>"><?php echo $rows['lastname'] ?>,
<?php echo $rows['firstname'] ?>
- <?php
echo $rows['party_name']?></option>
<?php
}
?>
</select>
<input type="button" value="Next" class="next action-button" name="next">
Should I need to echo which part help me please