<table width="500px" style="margin: 50px 0 10px 250px;">
<tr action="/" class="long">
<td for="date1">Tanggal Trx</td>
<td colspan="3"><input name="date" type="text" size="25" class="input" id="datepicker"/></td>
</tr>
<tr>
<td>Nomor struk</td>
<td colspan="3">
<?php
$j = date("Ymd");
$query = "SELECT max(kojul) AS last FROM jual WHERE kojul LIKE '$today%'";
$x = mysql_query($query);
$d =mysql_fetch_array($x);
$lastNoTransaksi = $d['last'];
$lastNoUrut = substr($lastNoTransaksi, 8, 4);
$nextNoUrut = $lastNoUrut + 1;
$next = $j.sprintf('%04s', $nextNoUrut);
echo " : ".$next;?>
<input type="hidden" name="no" size="29" value='<?php echo $next;?>'/></td>
</tr>
<tr action="/" class="long">
<td for="date1">Tanggal Input</td>
<td colspan="3"><input name="date" type="text" size="25" class="input" id="datepicker"/></td>
</tr>
<tr>
<td style="vertical-align: top;">Keterangan</td>
<td colspan="3"><textarea rows="5" cols="29" name="ket" value=''/></textarea></td>
</tr></table>