Hi Yudhizth ,
Imagine this db table structure:
id_nama_ijin || autonumber
Is all you need, because then is just incremente the autonumber every time you chose the id_nama_ijin, so, if the user select id_nama_ijin=01, using a dbquery you get the autonumber from id_nama_ijin, then save it and finally using another dbquery increment the autonumber of id_nama_ijin.
Some like this would work i think
<?php
$con=mysqli_connect("localhost","root","","YOUR_DB_NAME");
// Check connection
if (mysqli_connect_errno())
{
echo "Error: " . mysqli_connect_error();
}
$autoN = mysqli_query($con,"SELECT autonumber FROM #__nama_ijin WHERE id_nama_ijin='".$form->data["yourValue"]."'");
$line = mysqli_fetch_array($autoN);
$number=$line['autonumber'];
$incN=$number++;
$upAutoN = mysqli_query($con,"UPDATE #__nama_ijin SET autonumber='".$incN."' WHERE id_nama_ijin=".$form->data["yourValue"]."'");
I dind't test the code, so please, test it and debug if needed, and the $form->data["yourValue"] var is your box value. Don't forget to set the right values in $con.
In the end I think that the number var will have your autoNumber and in you db table it'll be updated.
BN