I want if the user clicks submit to return the the selected value when the form reloads
that what I try and no luck
<?php
$getData = $db->prepare("SELECT * FROM first_university_degree_list");
if ($getData->execute()) {
$res = $getData->get_result();
while ($data = $res->fetch_array()) {
?>
<option value="<?php echo $data['univ_degree']; ?>" <?php if($FirstUniversityDegree == $data['univ_degree']) echo 'selected="selected"'; ?>><?php echo $data['univ_degree']; ?></option>
<?php
}
}
?>
clearing the question
I have a validation for every field on the form so if any of this fields return false the options on the drop menu will return to the first item I need it to return on the selected item the users selected