文本框空白后循环

Why are my text boxes blank after my while loop?

If I remove the while loop the data then shows?

This is the form below.

<form name="form" method="post" action=""> 
<input type="hidden" name="new" value="1" />

<p><input type="text" name="res_veop_id" placeholder="Enter VEOP ID" required value="<?php echo $row["res_veop_id"]; ?>"/></p>

<p><select class="selectpicker" name="res_title">
    <option value="<?php echo $row["res_title"]; ?>"><?php echo $row["title_name"]; ?></option>
<?php
$title_count=1;
$title_sel_query="Select * from `tbl_title` ORDER BY `title_id` asc;";
$title_result = mysqli_query($con,$title_sel_query);
while($row = mysqli_fetch_assoc($title_result)) { ?>
    <option value="<?php echo $row["title_id"]; ?>"><?php echo $row["title_name"]; ?></option>
<?php $title_count++; } ?>
    </select>

</p>
<p><input type="text" name="res_first_name" placeholder="Enter Firstname" required value="<?php echo $row["res_first_name"]; ?>"/></p>
<p><input type="text" name="res_last_name" placeholder="Enter Lastname" required value="<?php echo $row["res_last_name"]; ?>"/></p>
<p><input type="text" name="res_dob" placeholder="Enter Date of Birth" required value="<?php echo $row["res_dob"]; ?>"/></p>

You use the variabel $row in your code to address the values, that shall be shown on the whole page. In your while loop, you overwrite the variable $row in the loop head. Since it is a while loop it will run until $row is null. Therefore all following calls on $row will return nothing.

I suggest you rename the variable:

while($option = mysqli_fetch_assoc($title_result)) { ?>
    <option value="<?php echo $option["title_id"]; ?>"><?php echo 
$option["title_name"]; ?></option>
<?php $title_count++; } ?>