Maybe someone can help me to sort this out with my code please?
Well, here is that I have this code between html:
$result2 = $db->get_results("SELECT * FROM Groups ORDER BY Group_ID");
foreach($result2 as $row) {
$grp_id = $row->Group_ID;
$grp_nm = $row->Group_NAME;
$value = 'subscribe_view.php?group=' . $grp_id;
$option = '<option value="' . $value . '">' . $grp_nm . '</option>';
echo $option;
}
So as you noticed I need to get drop down options as a rows. This is the way I can have exact names of groups from table. For the values I have javascript which transfers me selection to the value link (maybe there is another way to do this with php?). But When I click for example on one of those options aka. Sounding, it refreshes the page {as it has to be on the same page} and the selected option has not been assigned.
Does anyone of you guys know how can I have <selections> html drop down list to remember selection?
Please help me so I can continue with my coding. I am desperate with that
All your help are really appreciated. Thank you all!
S