I have generated a Bill Generator application without using a database. This application generates bills and saves them with a file name in a folder as an HTML file. Right now I am using a timestamp to generate a unique ID for each bill. Now I want to reduce the length of my ID; I want to use serial number.
Problem: I am using an integer variable and on click I increment the value by one, but when I restart my application, the counter is reset...
How can I save last generated value and pick up where I left off when the application restarts?