I am creating this for my varsity project. I am not so expert about it. so, I need someone to help me or guide me how to do it. Please see the image below:
When i search with some value putting in input field it goes empty after search. But i want to show current search value after search results show as like as the image below:
The id's of the search fields are: application_number, document_number Can anyone suggest any URL where can i find this solution or write me code for me. I used php and mysql for show the search result. Here is the code if this helps you to understand:
if(isset($_POST['searchbtn'])):
$application_number = trim($_POST['application_number']);
$document_number = trim($_POST['document_number']);
$sql_search = "SELECT * FROM search_info LEFT JOIN country ON country.`country_id`=`search_info`.`country_id` WHERE search_info.`application_number` = '$application_number' AND search_info.`document_number` = '$document_number' AND search_info.`is_deleted`=0";
$query = mysqli_query($con,$sql_search);
$count = mysqli_num_rows($query);
if($count>0):
$search_result = mysqli_fetch_array($query);
?>
<tr>
<td><center><?=$search_result['bill_number']?></center></td>
<td><center><?=$search_result['application_number']?></center></td>
<td><center><?=$search_result['application_date']?></center></td>
<td><center><?=$search_result['document_number']?></center></td>
<td><center><?=$search_result['name']?></center></td>
<td ><center><?=$search_result['Country_Name']?></center></td>
<td><center><?=$search_result['type_pass']?></center></td>
<td><center><?=$search_result['time_frame']?></center></td>
<td><center><?=$search_result['acquisition_place']?></center></td>
<td style="color:<?=$search_result['color']?>"><center><?=$search_result['application_status']?></center></td>
</tr>
<?php else:?>
<tr>
<td colspan="10">No Record Found</td>
</tr>
<?php endif;?>
I think it can be done with jquery or ajax. But i don't know how to do it. My coding skill is beginner level, so please consider it. Thanks