<style>
 td{font-family:sans-serif;color:black;}
 body{background-color:silver;font-family:sans-serif;color:black;}
input
  {border-style:ridge;
   border-color:gray;
   height:25px;
   border-size:1;
   font-family:sans-serif;
   color:black;
  }
</style>
<?
include("opendb.php");
$result=mysqli_query($db,"select min(date),max(date)  from journal2 where brcode='$brcode'") or die(mysqli_error());
$dtrow=mysqli_fetch_row($result)or die(mysqli_error());
$dtmin=explode('-',$dtrow[0]);
$dtmax=explode('-',$dtrow[1]);
?>
<center>
<p>&nbsp;<p>&nbsp;
<form action='viewjournal.php' method='post'>
<table border=1>
<tr><td align=center>
VIEW JOURNAL ENTRIES
<table>
<tr><td>from </td><td>DD <input type=text name=d maxlength=2 size=2 value='<?print $dtmin[2]?>'>
MM <input type=text name=m maxlength=2 size=2 value='<?print $dtmin[1]?>'>
YYYY<input type=text name=y maxlength=4 size=4 value='<?print $dtmin[0]?>'> </td></tr>

<tr><td>To </td><td>DD <input type=text name=d1 maxlength=2 size=2 value='<?print $dtmax[2]?>'>
MM <input type=text name=m1 maxlength=2 size=2 value='<?print $dtmax[1]?>'>
YYYY<input type=text name=y1 maxlength=4 size=4 value='<?print $dtmax[0]?>'> </td></tr>
<tr><td colspan=2 align=center> <input type=submit value='Show'> <input type=button value='Cancel' onClick=document.location='blank.html'></td></tr>
</table>
</td></tr>
</table>
</form>
