更新具有选择选项的表单

I am having a form, which contains select option for data entry, (the options are fetching from MySQL database) if I want to update the form at later stage, is it possible to get the form select option as pre-selected?

Here I am showing the code for form having select options

<?php
$queryjob = "SELECT * FROM `job`";
$result2 = mysqli_query($con, $queryjob);

$options = "";

while($row2 = mysqli_fetch_array($result2))
    {
        $options = $options."<option>$row2[1]</option>";
    }

?>


 <tr>
   <td ><div class='tabdata' align="right"> Name of Job/Survey:&nbsp;</div></td>
   <td > <div class='tfieldz' align="right">
         <select class='tfieldz' id="job_name" name="job_name" required='required'>
        <?php echo $options;?>
        </select></div>
  </td>
</tr>

You can add a selected="" attribute to the option to have the option pre-selected.

Example would look like:

//You could use this in your loop

if($saved_value == $row[1]){
  echo "<option selected>$row[1]</option>";
}else{
  echo "<option>$row[1]</option>";
}

As I understand you are trying to set the default selected value of the selectbox. To set this value you can use following code:

/** The selectbox default value. This can come from database */
$selectbox_value = "selectbox default value";
while($row2 = mysqli_fetch_array($result2))
    {
        if ($selectbox_value == $row2[1]) $options = $options."<option SELECTED value='".$row2[1]."'>$row2[1]</option>";
        else $options = $options."<option value='".$row2[1]."'>$row2[1]</option>";
    }

In the above code the value attribute is added to the option tag. When the form is submitted, the value of the value attribute is sent to the server and stored in database. This stored value should be read from database and saved to $selectbox_value