<?php
//include_once "library/seslogin.php";
include_once "library/connection.php";
include_once "library/library.php";
$name =$_POST['name'];
$today =date("Ymd");
$query1 = "SELECT max(id) as maxid FROM id_unik WHERE id LIKE '$today%'";
$hasil = mysql_query($query1);
$data = mysql_fetch_array($hasil);
$maxid = $data['maxid'];
$nourut = (int) substr($maxid, 8, 4);
$nourut++;
$newid = $today .sprintf('%04s', $nourut);
?>
<link href="styles/style.css" rel="stylesheet" type="text/css">
<link href="styles/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="plugins/tigra_calendar/tcal.css" rel="stylesheet" type="text/css" />
<div style="padding: 0 15px">
<div class="table-responsive">
<table class="table-bordered">
<form>
<tr>
<td>Name</td>
<td>:</td>
<td><input type="text" name="name" id="name" placeholder="Input Your Name Here"></td>
</tr>
<tr>
<td>Code</td>
<td>:</td>
<td><input type="text" name="code" id="code" value="<?php echo $newid; ?>"></td>
</tr>
<tr>
<td colspan="3" align="center"><input type="submit" name="submit" value="Save"></td>
</tr>
</form>
</table>
</div>
</div>