function autoNumberbaru(){
global $conn;
global $forward;
$query = "SELECT MAX(RIGHT(nota, 4)) as max_id FROM bayar ORDER BY nota";
$result = mysqli_query($conn, $query);
$data = mysqli_fetch_array($result);
$id_max = $data['max_id'];
$new_code = sprintf($id_max+1);
return $new_code;
}
anyone can help me to get auto number more than 10000 ?
i have try change return $new_code with return $new_code+1 but useless