<?
if($_GET[m] and $_GET[y]){
$date_search=$_GET[y]."-".$_GET[m];
$sql="select * from repair_detail where REPAIR_DATE like '%$date_search%' and ID_USER='".$_SESSION[id_user]."' order by ID_REPAIR";
}else{
$sql="select * from repair_detail where ID_USER='".$_SESSION[id_user]."' order by ID_REPAIR";
<?=option_month($_GET[m])?>
-
<?=option_year($_GET[y])?>
<input name="submit1" type="submit" value="แสดงข้อมูล">
</form></td>
</tr>
</table>
<br>
<br>
<div class="title" align = "center"><a href="<?=$thispage?>"> รายการช่อม </a></div> <br>
<?
if($_GET[m] and $_GET[y]){
$date_search=$_GET[y]."-".$_GET[m];
$sql="select * from repair_detail where REPAIR_DATE like '%$date_search%' and ID_USER='".$_SESSION[id_user]."' order by ID_REPAIR";
}else{
$sql="select * from repair_detail where ID_USER='".$_SESSION[id_user]."' order by ID_REPAIR";
echo $sql;
}
if($_GET[m] and $_GET[y]){
$date_search=$_GET[y]."-".$_GET[m];
$sql="select * from repair_detail where REPAIR_DATE like '%$date_search%' order by ID_REPAIR";
}elseif($_SESSION[em_priority]=="1") {
$sql="select * from repair_detail order by ID_REPAIR";
}